Author: np
Date: Wed Apr 22 07:12:18 2020
New Revision: 360188
URL: https://svnweb.freebsd.org/changeset/base/360188

Log:
  MFC r359952:
  
  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
  Sponsored by: Chelsio Communications

Modified:
  stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c
==============================================================================
--- stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c       Wed Apr 22 06:32:51 2020        
(r360187)
+++ stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c       Wed Apr 22 07:12:18 2020        
(r360188)
@@ -1013,7 +1013,6 @@ process_newconn(struct c4iw_listen_ep *master_lep, str
        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,13 +1022,14 @@ process_newconn(struct c4iw_listen_ep *master_lep, str
                                __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);
                return;
        }
        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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to