Author: imp
Date: Wed Feb 13 00:10:12 2019
New Revision: 344070
URL: https://svnweb.freebsd.org/changeset/base/344070

Log:
  Fix panic message.
  
  The panic message lead people to believe some userland CAM request had
  caused a problem when in reallity it was for a kernel request (eg the
  USER bit was cleared). Reword message. Also, improve a couple of
  comments to reflect that the periph shouldn't be completely torn down
  before we get here (so the path and sim pointers should be valid, but
  aren't and the code is designed to be robust enough in the face of
  that to give a specific panic message).

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c      Tue Feb 12 23:39:18 2019        (r344069)
+++ head/sys/cam/cam_xpt.c      Wed Feb 13 00:10:12 2019        (r344070)
@@ -5411,8 +5411,9 @@ xpt_done_process(struct ccb_hdr *ccb_h)
        }
 
        /*
-        * Insulate against a race where the periph is destroyed
-        * but CCBs are still not all processed.
+        * Insulate against a race where the periph is destroyed but CCBs are
+        * still not all processed. This shouldn't happen, but allows us better
+        * bug diagnostic when it does.
         */
        if (ccb_h->path->bus)
                sim = ccb_h->path->bus->sim;
@@ -5434,7 +5435,7 @@ xpt_done_process(struct ccb_hdr *ccb_h)
 
                if (sim)
                        devq = sim->devq;
-               KASSERT(devq, ("sim missing for XPT_FC_USER_CCB request"));
+               KASSERT(devq, ("Periph disappeared with request pending."));
 
                mtx_lock(&devq->send_mtx);
                devq->send_active--;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to