Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2017 08:43:41 +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-10@freebsd.org
Subject:   svn commit: r312587 - stable/10/sys/cam/ctl
Message-ID:  <201701210843.v0L8hfJR025772@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Jan 21 08:43:41 2017
New Revision: 312587
URL: https://svnweb.freebsd.org/changeset/base/312587

Log:
  MFC r311892: Do not wait for HA thread shutdown if scheduler is stopped.
  
  This wait loop made system hang on panic instead of reboot.

Modified:
  stable/10/sys/cam/ctl/ctl_ha.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_ha.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_ha.c	Sat Jan 21 08:43:11 2017	(r312586)
+++ stable/10/sys/cam/ctl/ctl_ha.c	Sat Jan 21 08:43:41 2017	(r312587)
@@ -1001,7 +1001,7 @@ ctl_ha_msg_shutdown(struct ctl_softc *ct
 		softc->ha_shutdown = 1;
 		softc->ha_wakeup = 1;
 		wakeup(&softc->ha_wakeup);
-		while (softc->ha_shutdown < 2) {
+		while (softc->ha_shutdown < 2 && !SCHEDULER_STOPPED()) {
 			msleep(&softc->ha_wakeup, &softc->ha_lock, 0,
 			    "shutdown", hz);
 		}



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