svn commit: r361502 - head/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Tue May 26 13:57:14 UTC 2020


Author: mav
Date: Tue May 26 13:57:14 2020
New Revision: 361502
URL: https://svnweb.freebsd.org/changeset/base/361502

Log:
  Do not remove upcall if we haven't yet.
  
  This fixes assertion if we failed to bind listening HA socket.
  
  MFC after:	1 week
  Sponsored by:	iXsystems, Inc.

Modified:
  head/sys/cam/ctl/ctl_ha.c

Modified: head/sys/cam/ctl/ctl_ha.c
==============================================================================
--- head/sys/cam/ctl/ctl_ha.c	Tue May 26 13:35:41 2020	(r361501)
+++ head/sys/cam/ctl/ctl_ha.c	Tue May 26 13:57:14 2020	(r361502)
@@ -197,7 +197,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;


More information about the svn-src-head mailing list