--- - branch: MAIN date: Sun Apr 26 19:31:36 UTC 2020 files: - new: '1.26' old: '1.25' path: src/sys/dev/nvmm/nvmm.c pathrev: src/sys/dev/nvmm/nvmm.c@1.26 type: modified id: 20200426T193136Z.858798e0438a462fb51b6f898a5ba61cd22e1472 log: | In nvmm_open(), make sure an implementation was found. This fixes an initialization bug triggerable in certain conditions. If you build nvmm inside the kernel, AND have a cpu that is not supported, AND run nvmmctl (or qemu-nvmm, both being the only binaries in the "nvmm" group), you get a page fault. This is because when nvmm is built inside the kernel, the kernel registers nvmm_cdevsw behind nvmm's back. The ioctl is therefore always accessible, and will hit NULL pointers if nvmm_init() failed. Problem reported by Andrei M. on netbsd-users@, thanks. module: src subject: 'CVS commit: src/sys/dev/nvmm' unixtime: '1587929496' user: maxv