diff options
author | marius eriksen <marius@cvs.openbsd.org> | 2004-11-01 06:39:40 +0000 |
---|---|---|
committer | marius eriksen <marius@cvs.openbsd.org> | 2004-11-01 06:39:40 +0000 |
commit | 328c87a3039bd9c581759c29b8c00aaed977b5d4 (patch) | |
tree | 7b092f8e2266e317158e3fcfb19884af19c6a5d4 /sys/kern/kern_lock.c | |
parent | ebbaab01d4eee56f5ee2fd2df99047801d0d516b (diff) |
additional DIAGNOSTIC, checking for proc in lockmgr when required
ok pedro@ tedu@
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 8ea70f3a097..4a56f9e6388 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lock.c,v 1.16 2004/06/13 21:49:26 niklas Exp $ */ +/* $OpenBSD: kern_lock.c,v 1.17 2004/11/01 06:39:39 marius Exp $ */ /* * Copyright (c) 1995 @@ -385,6 +385,10 @@ lockmgr(lkp, flags, interlkp, p) if (extflags & LK_SPIN) { pid = LK_KERNPROC; } else { +#ifdef DIAGNOSTIC + if (p == NULL) + panic("lockmgr: process context required"); +#endif /* Process context required. */ pid = p->p_pid; } |