HomeFreeBSD

ciss: Don't panic on null CR ciss_dequeue_notify

Description

ciss: Don't panic on null CR ciss_dequeue_notify

Apparently, sometimes on hot plug/unplug, a null cr comes back from
ciss_dequeue_notify. This is clearly a bug, and by ignoring it we're
papering over that bug. We only ever wake the thread after enqueing a
notification or setting a bit about killing the thread, so once we check
the bit isn't the cause, cr can't be NULL unless something else has
dequeued it.

Ideally, this would be fixed, rather than papered over, but this makes a
very old card somewhat more useable for external enclosures. I suspect
it's a race when we set CISS_THREAD_SHUT and another flag (the latter
w/o ciss_mtx held), but I don't see it and w/o hardware to reproduce
it would be hard to know for sure.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155

Details

Provenance
pen_lysator.liu.seAuthored on Mon, Oct 14, 4:01 AM
impCommitted on Mon, Oct 14, 5:37 AM
Reviewer
imp
Differential Revision
D25155: CISS: Support >48 JBOD drives, fix SES enumeration, no panic on unplug, sysctl tunables &more verbosity...
Parents
rGfd95966af50b: ciss: hw.ciss.initator_id to set the initiator ID
Branches
Unknown
Tags
Unknown