Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2019 00:29:39 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r350709 - stable/12/sys/cam
Message-ID:  <201908080029.x780Tdex066616@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Aug  8 00:29:39 2019
New Revision: 350709
URL: https://svnweb.freebsd.org/changeset/base/350709

Log:
  MFC r344070 (by imp): 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:
  stable/12/sys/cam/cam_xpt.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/cam/cam_xpt.c
==============================================================================
--- stable/12/sys/cam/cam_xpt.c	Thu Aug  8 00:27:26 2019	(r350708)
+++ stable/12/sys/cam/cam_xpt.c	Thu Aug  8 00:29:39 2019	(r350709)
@@ -5425,8 +5425,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;
@@ -5448,7 +5449,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--;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908080029.x780Tdex066616>