Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/landisk/landisk Lock vnode across VOP_OPEN/VOP_IOCT...
details: https://anonhg.NetBSD.org/src/rev/5eb62733ab10
branches: trunk
changeset: 364367:5eb62733ab10
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Mar 19 13:49:21 2022 +0000
description:
Lock vnode across VOP_OPEN/VOP_IOCTL/VOP_CLOSE.
diffstat:
sys/arch/landisk/landisk/autoconf.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r cb81e43804c0 -r 5eb62733ab10 sys/arch/landisk/landisk/autoconf.c
--- a/sys/arch/landisk/landisk/autoconf.c Sat Mar 19 13:48:42 2022 +0000
+++ b/sys/arch/landisk/landisk/autoconf.c Sat Mar 19 13:49:21 2022 +0000
@@ -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 @@
*/
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
Home |
Main Index |
Thread Index |
Old Index