diff options
| author | Peter Eriksson <pen@lysator.liu.se> | 2024-10-14 04:01:33 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2024-10-14 05:37:46 +0000 |
| commit | b339ab1491055d89415f85b6d1a03423193178f9 (patch) | |
| tree | 8a4c667292ab75c6c4f117544e82116a5477e43a | |
| parent | fd95966af50bab6229bc5e67fadc7ffd915f77f5 (diff) | |
| -rw-r--r-- | sys/dev/ciss/ciss.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index d4786302d928..d4ede91f6b35 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -4207,8 +4207,20 @@ ciss_notify_thread(void *arg) cr = ciss_dequeue_notify(sc); - if (cr == NULL) - panic("cr null"); + if (cr == NULL) { + /* + * We get a NULL message sometimes when unplugging/replugging + * stuff But this indicates a bug, since we only wake this thread + * when we (a) set the THREAD_SHUT flag, or (b) we have enqueued + * something. Since it's reported around errors, it may be a + * locking bug related to ciss_flags being modified in multiple + * threads some without ciss_mtx held. Or there's some other + * way we either fail to sleep or corrupt the ciss_flags. + */ + ciss_printf(sc, "Driver bug: NULL notify event received\n"); + continue; + } + cn = (struct ciss_notify *)cr->cr_data; switch (cn->class) { |
