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
This commit is contained in:
parent
fb9f2a1abb
commit
b90518c84c
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user