NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/60568 CVS commit: [netbsd-10] src/sys



The following reply was made to PR kern/60568; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/60568 CVS commit: [netbsd-10] src/sys
Date: Sun, 25 Oct 2026 11:02:59 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Oct 25 11:02:59 UTC 2026
 
 Modified Files:
 	src/sys/kern [netbsd-10]: kern_proc.c
 	src/sys/sys [netbsd-10]: proc.h
 	src/sys/uvm [netbsd-10]: uvm_map.c
 
 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1397):
 
 	sys/uvm/uvm_map.c: revision 1.432
 	sys/sys/proc.h: revision 1.374
 	sys/kern/kern_proc.c: revision 1.284
 	sys/kern/kern_proc.c: revision 1.285
 	sys/kern/kern_proc.c: revision 1.286
 	(all via patch)
 
 kern: New function proc_find_reflocked.
 
 This is like proc_find_locked but returns with p_reflock held rather
 than p_lock.  Will be used to replace proc_find_locked in order to
 fix:
 
 PR kern/60568: panic locking against myself (p->p_lock) in NFS from
 sysctl_vmproc
 
 No modules currently use proc_find_locked or proc_find_reflocked, so
 there should be no module ABI compatibility issues here.
 
 sysctl vm.proc.*: Use p_reflock, not p_lock.
 - Avoid holding p_lock across copyout; this risks deadlock or panic
   if memory is exhausted and the uvm fault handler during copyout
   tries to deliver SIGKILL, which requires p_lock.
 - Avoid holding p_lock across vnode_to_path: this risks deadlock or
   panic if the file system, such as nfs, tries to check for pending
   signals, which requires p_lock.
 
 PR kern/60568: panic locking against myself (p->p_lock) in NFS from
 sysctl_vmproc
 
 sysctl kern.proc_args.*.cwd/pathname: Use p_reflock, not p_lock.
 - Avoid holding p_lock across copyout; this risks deadlock or panic
   if memory is exhausted and the uvm fault handler during copyout
   tries to deliver SIGKILL, which requires p_lock.
 - Avoid holding p_lock across vnode_to_path: this risks deadlock or
   panic if the file system, such as nfs, tries to check for pending
   signals, which requires p_lock.
 
 PR kern/60568: panic locking against myself (p->p_lock) in NFS from
 sysctl_vmproc
 
 proc_vmspace_getref: Take p->p_lock around p->p_sflag access.
 Prompted by reviewing the locking rules in;
 
 PR kern/60568: panic locking against myself (p->p_lock) in NFS from
 sysctl_vmproc
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.269.2.1 -r1.269.2.2 src/sys/kern/kern_proc.c
 cvs rdiff -u -r1.370.4.2 -r1.370.4.3 src/sys/sys/proc.h
 cvs rdiff -u -r1.403.2.4 -r1.403.2.5 src/sys/uvm/uvm_map.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 



Home | Main Index | Thread Index | Old Index