From owner-dev-commits-src-main@freebsd.org Sat Sep 25 14:28:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74D0F6AA2F9; Sat, 25 Sep 2021 14:28:11 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HGrpz2hHRz4cSb; Sat, 25 Sep 2021 14:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38DFD3FA2; Sat, 25 Sep 2021 14:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18PESBBL073041; Sat, 25 Sep 2021 14:28:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18PESBnB073040; Sat, 25 Sep 2021 14:28:11 GMT (envelope-from git) Date: Sat, 25 Sep 2021 14:28:11 GMT Message-Id: <202109251428.18PESBnB073040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ed8ef7ae8b05 - main - cam: Avoiding waking up doneq threads if we're dumping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed8ef7ae8b05d9f73db2182b5e24b0b76b0783a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2021 14:28:11 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ed8ef7ae8b05d9f73db2182b5e24b0b76b0783a2 commit ed8ef7ae8b05d9f73db2182b5e24b0b76b0783a2 Author: Mark Johnston AuthorDate: 2021-09-25 14:13:56 +0000 Commit: Mark Johnston CommitDate: 2021-09-25 14:15:03 +0000 cam: Avoiding waking up doneq threads if we're dumping Depending on the state of the target doneq thread at the time of the panic, the wakeup can hang indefinitely in thread_lock_block_wait(). That function should likely be modified to return immediately if the scheduler is stopped, but it is also preferable to avoid wakeups in general after a panic. Reported by: pho Reviewed by: mav, imp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32126 --- sys/cam/cam_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 6b5a04b174e1..e228f0967f0e 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4627,7 +4627,7 @@ xpt_done(union ccb *done_ccb) STAILQ_INSERT_TAIL(&queue->cam_doneq, &done_ccb->ccb_h, sim_links.stqe); done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; mtx_unlock(&queue->cam_doneq_mtx); - if (run) + if (run && !dumping) wakeup(&queue->cam_doneq); }