From owner-svn-src-all@freebsd.org Wed Feb 13 00:10:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F8E414D884E; Wed, 13 Feb 2019 00:10:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBC7D8B443; Wed, 13 Feb 2019 00:10:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B78491F5AB; Wed, 13 Feb 2019 00:10:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1D0ACLW080766; Wed, 13 Feb 2019 00:10:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1D0AC3s080765; Wed, 13 Feb 2019 00:10:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201902130010.x1D0AC3s080765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 13 Feb 2019 00:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344070 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 344070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DBC7D8B443 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 00:10:13 -0000 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--;