aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2017-06-29 19:43:27 +0000
committerNavdeep Parhar <np@FreeBSD.org>2017-06-29 19:43:27 +0000
commit98c9236978c437d5a0c7fdc8d181a3913abdae4c (patch)
treea7f68771b2a10d16f34e48511c798b9f8f0b238e /sys
parent785c0d4d974e281348cfb2e1197a480d40a795b6 (diff)
downloadsrc-98c9236978c437d5a0c7fdc8d181a3913abdae4c.tar.gz
src-98c9236978c437d5a0c7fdc8d181a3913abdae4c.zip
Adjust sowakeup post-r319685 so that it continues to make upcalls but
still avoids calling soconnected during sodisconnected. Discussed with: glebius@ Sponsored by: Chelsio Communications
Notes
Notes: svn path=/head/; revision=320480
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_sockbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 51874fbbb25b..c3fd0ab2a276 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -322,7 +322,7 @@ sowakeup(struct socket *so, struct sockbuf *sb)
wakeup(&sb->sb_acc);
}
KNOTE_LOCKED(&sb->sb_sel->si_note, 0);
- if (sb->sb_upcall != NULL && !(so->so_state & SS_ISDISCONNECTED)) {
+ if (sb->sb_upcall != NULL) {
ret = sb->sb_upcall(so, sb->sb_upcallarg, M_NOWAIT);
if (ret == SU_ISCONNECTED) {
KASSERT(sb == &so->so_rcv,
@@ -334,7 +334,7 @@ sowakeup(struct socket *so, struct sockbuf *sb)
if (sb->sb_flags & SB_AIO)
sowakeup_aio(so, sb);
SOCKBUF_UNLOCK(sb);
- if (ret == SU_ISCONNECTED)
+ if (ret == SU_ISCONNECTED && !(so->so_state & SS_ISDISCONNECTED))
soisconnected(so);
if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL)
pgsigio(&so->so_sigio, SIGIO, 0);