Ensure that the disk has been initialized after acquiring the lock and
authoranton <anton@openbsd.org>
Tue, 21 Dec 2021 06:11:16 +0000 (06:11 +0000)
committeranton <anton@openbsd.org>
Tue, 21 Dec 2021 06:11:16 +0000 (06:11 +0000)
commit4d2db379fd33b57e0ddb490faeb02b222092f374
treefd16138a40a0ba855db2c29824ee983e88553af4
parent6c4edd676bcde7837e3ec6310fdb912a9cd22845
Ensure that the disk has been initialized after acquiring the lock and
not before as we might end up sleeping while acquiring the lock,
introducing a potential race.

Tested in snaps for a couple of days.

ok mpi@

Reported-by: syzbot+c87cdc2905b441c20d39@syzkaller.appspotmail.com
sys/dev/vnd.c