aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-05-26 15:08:35 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-05-26 15:08:35 +0000
commit3873b14991096dabd4fa0930acea3e83076bcd0c (patch)
treef9d17e0fca1ab0a5d0251477e0e02848ff3c5ceb /sys/cam/ctl
parentb01edfb515c96c7b437127f62a809da45435d2e7 (diff)
downloadsrc-3873b14991096dabd4fa0930acea3e83076bcd0c.tar.gz
src-3873b14991096dabd4fa0930acea3e83076bcd0c.zip
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.
Notes
Notes: svn path=/head/; revision=361509
Diffstat (limited to 'sys/cam/ctl')
-rw-r--r--sys/cam/ctl/ctl_ha.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c
index 8e261de837f7..572bdc40badc 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;
}