aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-05-26 13:57:14 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-05-26 13:57:14 +0000
commitfd10265cd2d6b27a08e201685aef14d203961abc (patch)
treec91fb70e91e2e76f9bc633ce832ff6b911dfebb6 /sys/cam/ctl
parentf44b6537566cf0cd65a322550ef2aace2931d926 (diff)
downloadsrc-fd10265cd2d6b27a08e201685aef14d203961abc.tar.gz
src-fd10265cd2d6b27a08e201685aef14d203961abc.zip
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.
Notes
Notes: svn path=/head/; revision=361502
Diffstat (limited to 'sys/cam/ctl')
-rw-r--r--sys/cam/ctl/ctl_ha.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c
index 8afb1162abc7..8e261de837f7 100644
--- a/sys/cam/ctl/ctl_ha.c
+++ b/sys/cam/ctl/ctl_ha.c
@@ -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;