Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2020 20:37:31 +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: r361730 - stable/11/sys/cam/ctl
Message-ID:  <202006022037.052KbVuk050287@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jun  2 20:37:31 2020
New Revision: 361730
URL: https://svnweb.freebsd.org/changeset/base/361730

Log:
  MFC r361502: Do not remove upcall if we haven't yet.
  
  This fixes assertion if we failed to bind listening HA socket.

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	Tue Jun  2 20:37:04 2020	(r361729)
+++ stable/11/sys/cam/ctl/ctl_ha.c	Tue Jun  2 20:37:31 2020	(r361730)
@@ -257,7 +257,8 @@ ctl_ha_lclose(struct ha_softc *softc)
 
 	if (softc->ha_lso) {
 		SOCKBUF_LOCK(&softc->ha_lso->so_rcv);
-		soupcall_clear(softc->ha_lso, SO_RCV);
+		if (softc->ha_lso->so_rcv.sb_upcall != NULL)
+			soupcall_clear(softc->ha_lso, SO_RCV);
 		SOCKBUF_UNLOCK(&softc->ha_lso->so_rcv);
 		soclose(softc->ha_lso);
 		softc->ha_lso = NULL;



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