diff options
author | jhb <jhb@FreeBSD.org> | 2003-03-06 17:25:06 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-03-06 17:25:06 +0000 |
commit | 7e6cfbee4e15ed250dbcb2281576255e700dc580 (patch) | |
tree | 00a87cec1b69a91d2f131b59f867651b64a824f2 /sys/kern/subr_witness.c | |
parent | a1ec1684de67c428fe3603f62fb1e65324126769 (diff) | |
download | FreeBSD-src-7e6cfbee4e15ed250dbcb2281576255e700dc580.zip FreeBSD-src-7e6cfbee4e15ed250dbcb2281576255e700dc580.tar.gz |
Oops, fix the double faults people were seeing with the recent changes to
witness. Sleepable locks such as sx locks always come before all mutexes
including Giant. However, the static lock order list placed Giant before
the proctree and allproc sx locks. This resulted in witness creating a
cycle in its lock order "tree" (real trees don't have cycles) leading to
infinite recursion and eventually a double fault. To fix, put Giant after
sx locks in the lock order list.
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r-- | sys/kern/subr_witness.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index d4315de..6e87dc4 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -235,9 +235,9 @@ static struct witness_child_list_entry w_childdata[WITNESS_CHILDCOUNT]; static struct lock_list_entry w_locklistdata[LOCK_CHILDCOUNT]; static struct witness_order_list_entry order_lists[] = { - { "Giant", &lock_class_mtx_sleep }, { "proctree", &lock_class_sx }, { "allproc", &lock_class_sx }, + { "Giant", &lock_class_mtx_sleep }, { "filedesc structure", &lock_class_mtx_sleep }, { "pipe mutex", &lock_class_mtx_sleep }, { "sigio lock", &lock_class_mtx_sleep }, |