--- - branch: MAIN date: Wed Dec 21 02:28:06 UTC 2022 files: - new: '1.207' old: '1.206' path: src/sys/uvm/uvm_swap.c pathrev: src/sys/uvm/uvm_swap.c@1.207 type: modified id: 20221221T022806Z.234019dfdac0a52a47134b624afb904f56a7a7c3 log: | swap: disallow user opens of swap block device the swap/drum block device was never intended to allow user opens, but when the internal VOP_OPEN() in uvm_swap_init() was added back in rev 1.135, the d_open method was changed from always-fail to always-succeed in order to allow the new initial internal open. this had the side effect of incorrectly allowing user opens too. fix this by replacing the swap_bdevsw d_open with one that succeeds for the first call but fails for all subsequent calls. Reported-by: syzbot+90a23d2f19e5a0a302b3@syzkaller.appspotmail.com module: src subject: 'CVS commit: src/sys/uvm' unixtime: '1671589686' user: chs