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 Fix vnode locking around VOP_OPEN.
details: https://anonhg.NetBSD.org/src/rev/641b91399996
branches: trunk
changeset: 365925:641b91399996
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Tue May 03 14:20:24 2022 +0000
description:
Fix vnode locking around VOP_OPEN.
diffstat:
sys/arch/landisk/landisk/autoconf.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 2a8b519a8fe3 -r 641b91399996 sys/arch/landisk/landisk/autoconf.c
--- a/sys/arch/landisk/landisk/autoconf.c Tue May 03 14:11:59 2022 +0000
+++ b/sys/arch/landisk/landisk/autoconf.c Tue May 03 14:20:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.9 2022/03/19 13:49:21 hannken Exp $ */
+/* $NetBSD: autoconf.c,v 1.10 2022/05/03 14:20:24 mlelstv Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.9 2022/03/19 13:49:21 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.10 2022/05/03 14:20:24 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -122,6 +122,7 @@
vput(tmpvn);
return (0);
}
+ VOP_UNLOCK(tmpvn);
error = VOP_IOCTL(tmpvn, DIOCGDINFO, &label, FREAD, NOCRED);
if (error) {
/*
@@ -140,6 +141,7 @@
found = 1;
closeout:
+ vn_lock(tmpvn, LK_EXCLUSIVE | LK_RETRY);
VOP_CLOSE(tmpvn, FREAD, NOCRED);
vput(tmpvn);
return (found);
Home |
Main Index |
Thread Index |
Old Index