aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorSuleiman Souhlal <ssouhlal@FreeBSD.org>2005-07-01 16:28:32 +0000
committerSuleiman Souhlal <ssouhlal@FreeBSD.org>2005-07-01 16:28:32 +0000
commit571dcd15e24b65783f9a5063cf81b9cc95449ffe (patch)
treec6d52b2fecc4fcf947f2ca3718ee85b3a7aaeff0 /sys/kern/kern_fork.c
parent5af5f40c7555dcdf008903bfabcb8b5783de6512 (diff)
downloadsrc-571dcd15e24b65783f9a5063cf81b9cc95449ffe.tar.gz
src-571dcd15e24b65783f9a5063cf81b9cc95449ffe.zip
Fix the recent panics/LORs/hangs created by my kqueue commit by:
- Introducing the possibility of using locks different than mutexes for the knlist locking. In order to do this, we add three arguments to knlist_init() to specify the functions to use to lock, unlock and check if the lock is owned. If these arguments are NULL, we assume mtx_lock, mtx_unlock and mtx_owned, respectively. - Using the vnode lock for the knlist locking, when doing kqueue operations on a vnode. This way, we don't have to lock the vnode while holding a mutex, in filt_vfsread. Reviewed by: jmg Approved by: re (scottl), scottl (mentor override) Pointyhat to: ssouhlal Will be happy: everyone
Notes
Notes: svn path=/head/; revision=147730
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 75214492a9ad..56ad939f480c 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -271,7 +271,7 @@ fork1(td, flags, pages, procp)
#ifdef MAC
mac_init_proc(newproc);
#endif
- knlist_init(&newproc->p_klist, &newproc->p_mtx);
+ knlist_init(&newproc->p_klist, &newproc->p_mtx, NULL, NULL, NULL);
/* We have to lock the process tree while we look for a pid. */
sx_slock(&proctree_lock);