Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Lock vnode for VOP_PATHCONF().
details: https://anonhg.NetBSD.org/src/rev/5b39b8daca0c
branches: trunk
changeset: 365241:5b39b8daca0c
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Apr 16 07:59:02 2022 +0000
description:
Lock vnode for VOP_PATHCONF().
diffstat:
sys/kern/sys_descrip.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 6e6b40ad3ef0 -r 5b39b8daca0c sys/kern/sys_descrip.c
--- a/sys/kern/sys_descrip.c Sat Apr 16 07:58:21 2022 +0000
+++ b/sys/kern/sys_descrip.c Sat Apr 16 07:59:02 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_descrip.c,v 1.39 2022/03/15 10:37:42 riastradh Exp $ */
+/* $NetBSD: sys_descrip.c,v 1.40 2022/04/16 07:59:02 hannken Exp $ */
/*-
* Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_descrip.c,v 1.39 2022/03/15 10:37:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_descrip.c,v 1.40 2022/04/16 07:59:02 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -595,7 +595,9 @@
break;
case DTYPE_VNODE:
+ vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
error = VOP_PATHCONF(fp->f_vnode, SCARG(uap, name), retval);
+ VOP_UNLOCK(fp->f_vnode);
break;
case DTYPE_KQUEUE:
Home |
Main Index |
Thread Index |
Old Index