From nobody Mon Dec 20 05:34:31 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AEB641908F46; Mon, 20 Dec 2021 05:34:31 +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 4JHSvW3LSvz4rT3; Mon, 20 Dec 2021 05:34:31 +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 4F17A10BEA; Mon, 20 Dec 2021 05:34:31 +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 1BK5YV6X060083; Mon, 20 Dec 2021 05:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BK5YVwJ060082; Mon, 20 Dec 2021 05:34:31 GMT (envelope-from git) Date: Mon, 20 Dec 2021 05:34:31 GMT Message-Id: <202112200534.1BK5YVwJ060082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: e0ceec676dc8 - main - cam: don't send scsi commands on shutdown when reboot method RB_NOSYNC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0ceec676dc86ddca960a9858ae5e3a4e0c8390d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639978471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgtGLj6VltXjgxWZt7gq6cuPCllMssuf7PcHE0fzSm8=; b=PDcU46WbWm8gU2ZxOkETiXEaB+6jdSL/65QMFuGDwSwJElj3HGWsvvt5BeNgzKqlj2juvw IneeAXF1RDOfdENJB6oYeqq7j1OpHD4beM7A8hrw0a+1QKeWxl9nU0WCq29Aku8al3Qz22 Y4o2wXgpiqbICNHSYmx80WxzHn1q3E1TtXzg8eU4W4WK8sokNXvk9w/0XieVSCSi/5hf4r 6gRslwb410yzOAZ9CN/xjQcvgBgUDTOreBw8U1zawsfcrUfR8ybGmTNL2+udSJcK0bBnUI 3XdzBo/5WY5uZAjz3kmRlr4rKAgH5zsYVVxfGWKL263+f8SXNze1eJZHHLkXWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639978471; a=rsa-sha256; cv=none; b=TYFRckVxLk1DubpsY3o3ThYBnLCRJBWobtkHZ3JXV4WQnu3/MhjknAs8G8Z49DcNX3DX6j UJiToNasOeLIbsXH7WNWRMcrzhYg7OIQDcv3An6YTb+FEiYr7aYIUCD4kHgJG9C7Z1u3T5 Z14weF4GYfpwnP/3QB7yiBAIxVEpK0nDwV+HC0bEFUO3TNas51jeDvh5ofJdh6ZAtohj69 WF85vy4niYG6sEtneIAZ6khkDGwdgiReevOcWGl4OGa1lH9TPsPWm06oOteQhi7sZqSqZY eHDGgDfxY8zRFUuJ5ZAboHLumKRW0XSZvN3jrbG2bgv9Y4z7I4kqhczBHO9FTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=e0ceec676dc86ddca960a9858ae5e3a4e0c8390d commit e0ceec676dc86ddca960a9858ae5e3a4e0c8390d Author: Wojciech Macek AuthorDate: 2021-12-20 05:32:51 +0000 Commit: Wojciech Macek CommitDate: 2021-12-20 05:32:51 +0000 cam: don't send scsi commands on shutdown when reboot method RB_NOSYNC Don't send the SCSI comand SYNCHRONIZE CACHE on devices that are still open when RB_NOSYNC is the reboot method. This may avoid recursive panics when doadump is called due to a SCSI/CAM/USB error/bug. Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: imp Differential revision: https://reviews.freebsd.org/D31549 --- sys/cam/scsi/scsi_da.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 0bcbccc7eab9..243e86d18caa 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -6245,6 +6246,9 @@ dashutdown(void * arg, int howto) union ccb *ccb; int error; + if ((howto & RB_NOSYNC) != 0) + return; + CAM_PERIPH_FOREACH(periph, &dadriver) { softc = (struct da_softc *)periph->softc; if (SCHEDULER_STOPPED()) {