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

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

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/11/sys/cam/ctl/ctl_ha.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl_ha.c
==============================================================================
--- stable/11/sys/cam/ctl/ctl_ha.c	Sat Jan 21 08:41:00 2017	(r312585)
+++ stable/11/sys/cam/ctl/ctl_ha.c	Sat Jan 21 08:43:11 2017	(r312586)
@@ -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.v0L8hBFk025701>