aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2020-04-15 03:40:33 +0000
committerNavdeep Parhar <np@FreeBSD.org>2020-04-15 03:40:33 +0000
commitddde90ac812b51bd7d73c208fe72415c9b85b263 (patch)
tree171c61a5bbc5bc1cf2e059ff50f1955069ec0b1f /sys
parent52c39ee6436cddae38e6f1b5d51e71dc1fa10028 (diff)
downloadsrc-ddde90ac812b51bd7d73c208fe72415c9b85b263.tar.gz
src-ddde90ac812b51bd7d73c208fe72415c9b85b263.zip
cxgbe/iw_cxgbe: Do not start the EP timer if soaccept fails.
This fixes a panic that would occur when the timer tried to close a stale socket. Submitted by: Krishnamraju Eraparaju @ Chelsio MFC after: 1 week Sponsored by: Chelsio Communications
Notes
Notes: svn path=/head/; revision=359952
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/cm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c
index 48d7d18f5f33..849ece6e4bec 100644
--- a/sys/dev/cxgbe/iw_cxgbe/cm.c
+++ b/sys/dev/cxgbe/iw_cxgbe/cm.c
@@ -1013,7 +1013,6 @@ process_newconn(struct c4iw_listen_ep *master_lep, struct socket *new_so)
c4iw_get_ep(&real_lep->com);
init_timer(&new_ep->timer);
new_ep->com.state = MPA_REQ_WAIT;
- START_EP_TIMER(new_ep);
setiwsockopt(new_so);
ret = soaccept(new_so, (struct sockaddr **)&remote);
@@ -1023,7 +1022,6 @@ process_newconn(struct c4iw_listen_ep *master_lep, struct socket *new_so)
__func__, master_lep->com.so, new_so, ret);
if (remote != NULL)
free(remote, M_SONAME);
- uninit_iwarp_socket(new_so);
soclose(new_so);
c4iw_put_ep(&new_ep->com);
c4iw_put_ep(&real_lep->com);
@@ -1031,6 +1029,8 @@ process_newconn(struct c4iw_listen_ep *master_lep, struct socket *new_so)
}
free(remote, M_SONAME);
+ START_EP_TIMER(new_ep);
+
/* MPA request might have been queued up on the socket already, so we
* initialize the socket/upcall_handler under lock to prevent processing
* MPA request on another thread(via process_req()) simultaniously.