From nobody Thu Nov 23 16:08:01 2023 X-Original-To: dev-commits-src-all@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 4Sbjh146Fnz51nZK; Thu, 23 Nov 2023 16:08:01 +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 4Sbjh13gG1z4Q17; Thu, 23 Nov 2023 16:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700755681; 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=9mJY/bR5I4z3SIP50SRvxqdqkEdZdyec+1Z/OB5cFGI=; b=NV2vaS6Fp5XWmT3P2DbXHLt/9ZS8HqseZ/bzjivVapv7t2xIlyQJociE9fz1SlNZnBktNj eZGlaFfdCnwxkyiEP8VOs2Wukrmyz5Rhw3WaJ+7bzV6B4sMXLJaQDUZA4Wfi1m4HXE2tyc F/zHyU8RT6n1mYBGRK9qLpGBk5nS7ROrMTXReM8Z9vBdglDxZeOuR84audkTBCz2liicZt Q6klKYKD6vjo5rtnwBa9kEToih1R5v56fHmL4l3KDjWSmSxBYVX+eAUNFwT15BUVCa7hrp zICdzJ0qUvhUWBb09AIJenyRYz0F+q1cLX/OQFoxptzqY/Qxuhyy9ac8yi/Ydw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700755681; 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=9mJY/bR5I4z3SIP50SRvxqdqkEdZdyec+1Z/OB5cFGI=; b=MWHzTkhUR3b0Uz+OLRY4bGM8w1me/UvEI3drKdLbzT6mIeqsnP3d+9kMkUDlO94LRCIMQ3 ++cr2g4IRSTxJ3TZRBjTObxXuzVODjp542rKtilCUN8cjzMtbhuPjGOGlJuIJ312UgU7xI mQBvhCkrnEle5ROS5g1a9iXO6arlpRJJ28FLPTyQlVoK4wBwFf0J4O1ziqyQHNp4mzQoTb aEbF30qwpIUYoicgPAJ66EVio1QE+wLJtPatU4bz+MYJaJM9+XWUXtaxEb3CqAnXraB3ce x7KU8XlAbLBiu/rjHcZ9g6vm+79gQ8r6x8U4QVip7n3PQe01do6NVdBHOW2fag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700755681; a=rsa-sha256; cv=none; b=pbSuwGtamRTIJV7+vyAOn16lE9Eqq9VrbXePO8oCfz/ZDKPu/HzJVAaSnXtmZQvITg6umK mSg69qMnqOy9VEMJWCRYEfyxZXLIKN9geYsqcRhjrvkyJeHeuiXMxLThSpbd3aKA2uwgjN qojZIEoMuYXxVn8keXHxtgpooxJiBGwd3pjdf3/E+xrOQv4PJ1h47ipH9MJV6k+hKEvB0C U44hK02TU1AVwfO4PVarcPEuuAEsls4O6FD0jCIafiN21FFReHsOSNCGrIwHB/DD1HcThe SJT3+uTpVV8y1q+Ex0imhpIOXpdm5TXz7tiNR4LY30k8NFmWzXFSCUNBZeLfJg== 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 4Sbjh12hfJz17hL; Thu, 23 Nov 2023 16:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ANG81LF007592; Thu, 23 Nov 2023 16:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ANG81xT007589; Thu, 23 Nov 2023 16:08:01 GMT (envelope-from git) Date: Thu, 23 Nov 2023 16:08:01 GMT Message-Id: <202311231608.3ANG81xT007589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 9d61fd084996 - main - ctl_ha: don't shutdown threads if scheduler is stopped List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d61fd08499609a2c95d1c66f97587932b446f06 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9d61fd08499609a2c95d1c66f97587932b446f06 commit 9d61fd08499609a2c95d1c66f97587932b446f06 Author: Mitchell Horne AuthorDate: 2023-11-23 15:25:54 +0000 Commit: Mitchell Horne CommitDate: 2023-11-23 16:07:42 +0000 ctl_ha: don't shutdown threads if scheduler is stopped In this case, just return. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42341 --- sys/cam/ctl/ctl_ha.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index 181f42640cce..0828c46c8863 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -909,13 +909,16 @@ ctl_ha_msg_shutdown(struct ctl_softc *ctl_softc) { struct ha_softc *softc = &ha_softc; + if (SCHEDULER_STOPPED()) + return; + /* Disconnect and shutdown threads. */ mtx_lock(&softc->ha_lock); if (softc->ha_shutdown < 2) { softc->ha_shutdown = 1; softc->ha_wakeup = 1; wakeup(&softc->ha_wakeup); - while (softc->ha_shutdown < 2 && !SCHEDULER_STOPPED()) { + while (softc->ha_shutdown < 2) { msleep(&softc->ha_wakeup, &softc->ha_lock, 0, "shutdown", hz); }