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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to