From d16229755ce4eb76c4fc82062166cc254736985c Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 17 Apr 2001 03:35:38 +0000 Subject: 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 --- sys/kern/subr_witness.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/kern/subr_witness.c') 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; -- cgit v1.1