From 3873b14991096dabd4fa0930acea3e83076bcd0c Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 26 May 2020 15:08:35 +0000 Subject: [PATCH] Fix fallout of r319722 in CTL HA. ha_lso is a listening socket (unless bind() has failed), so should use solisten_upcall_set(NULL, NULL), not soupcall_clear(). MFC after: 1 week Sponsored by: iXsystems, Inc. --- sys/cam/ctl/ctl_ha.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index 8e261de837f..572bdc40bad 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -196,10 +196,11 @@ ctl_ha_lclose(struct ha_softc *softc) { if (softc->ha_lso) { - SOCKBUF_LOCK(&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); + if (SOLISTENING(softc->ha_lso)) { + SOLISTEN_LOCK(softc->ha_lso); + solisten_upcall_set(softc->ha_lso, NULL, NULL); + SOLISTEN_UNLOCK(softc->ha_lso); + } soclose(softc->ha_lso); softc->ha_lso = NULL; }