Module Name: src
Committed By: hannken
Date: Sat Mar 19 13:49:21 UTC 2022
Modified Files:
src/sys/arch/landisk/landisk: autoconf.c
Log Message:
Lock vnode across VOP_OPEN/VOP_IOCTL/VOP_CLOSE.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/landisk/landisk/autoconf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/landisk/landisk/autoconf.c
diff -u src/sys/arch/landisk/landisk/autoconf.c:1.8 src/sys/arch/landisk/landisk/autoconf.c:1.9
--- src/sys/arch/landisk/landisk/autoconf.c:1.8 Sat Apr 6 00:09:09 2019
+++ src/sys/arch/landisk/landisk/autoconf.c Sat Mar 19 13:49:21 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.8 2019/04/06 00:09:09 uwe Exp $ */
+/* $NetBSD: autoconf.c,v 1.9 2022/03/19 13:49:21 hannken Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.8 2019/04/06 00:09:09 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.9 2022/03/19 13:49:21 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -107,6 +107,7 @@ match_bootdisk(device_t dv, struct btinf
*/
if (bdevvp(MAKEDISKDEV(bmajor, device_unit(dv), RAW_PART), &tmpvn))
panic("match_bootdisk: can't alloc vnode");
+ vn_lock(tmpvn, LK_EXCLUSIVE | LK_RETRY);
error = VOP_OPEN(tmpvn, FREAD, NOCRED);
if (error) {
#ifndef DEBUG