From: bluhm Date: Thu, 23 Dec 2021 10:09:16 +0000 (+0000) Subject: Disk lock was held when returning to userland. Add a missing unlock X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=41a45098bac2247db629acb1612a87f4586172eb;p=openbsd Disk lock was held when returning to userland. Add a missing unlock in vnd ioctl error path. Reported-by: syzbot+6dde3fda33074a256318@syzkaller.appspotmail.com OK jsg@ anton@ --- diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 53c12b2fdad..bbd124d8325 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.176 2021/12/21 06:12:03 anton Exp $ */ +/* $OpenBSD: vnd.c,v 1.177 2021/12/23 10:09:16 bluhm Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -498,6 +498,7 @@ fail: if ((error = disk_lock(&sc->sc_dk)) != 0) goto fail; if (sc->sc_flags & VNF_INITED) { + disk_unlock(&sc->sc_dk); error = EBUSY; goto fail; }