summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_witness.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-04-17 03:35:38 +0000
committerjhb <jhb@FreeBSD.org>2001-04-17 03:35:38 +0000
commitd16229755ce4eb76c4fc82062166cc254736985c (patch)
tree48180ea9137e3d4682dadd4e9f2bb7cc76be8ac6 /sys/kern/subr_witness.c
parent444804685366d0ba28d4365a9e6df0a05b1d377f (diff)
downloadFreeBSD-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>
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r--sys/kern/subr_witness.c4
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;
OpenPOWER on IntegriCloud