diff options
author | jhb <jhb@FreeBSD.org> | 2001-04-17 03:35:38 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-04-17 03:35:38 +0000 |
commit | d16229755ce4eb76c4fc82062166cc254736985c (patch) | |
tree | 48180ea9137e3d4682dadd4e9f2bb7cc76be8ac6 | |
parent | 444804685366d0ba28d4365a9e6df0a05b1d377f (diff) | |
download | FreeBSD-src-d16229755ce4eb76c4fc82062166cc254736985c.zip FreeBSD-src-d16229755ce4eb76c4fc82062166cc254736985c.tar.gz |
Check to see if enroll() returns NULL in the witness initialization. This
can happen if witness runs out of resources during initialization or if
witness_skipspin is enabled.
Sleuthing by: Peter Jeremy <peter.jeremy@alcatel.com.au>
-rw-r--r-- | sys/kern/subr_witness.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index c9e186d..7c49a37 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -299,9 +299,13 @@ witness_initialize(void *dummy __unused) /* First add in all the specified order lists. */ for (order = order_lists; order->w_name != NULL; order++) { w = enroll(order->w_name, order->w_class); + if (w == NULL) + continue; w->w_file = "order list"; for (order++; order->w_name != NULL; order++) { w1 = enroll(order->w_name, order->w_class); + if (w1 == NULL) + continue; w1->w_file = "order list"; itismychild(w, w1); w = w1; |