Author: np
Date: Wed Apr 15 03:40:33 2020
New Revision: 359952
URL: https://svnweb.freebsd.org/changeset/base/359952

Log:
  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

Modified:
  head/sys/dev/cxgbe/iw_cxgbe/cm.c

Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c
==============================================================================
--- head/sys/dev/cxgbe/iw_cxgbe/cm.c    Wed Apr 15 02:34:44 2020        
(r359951)
+++ head/sys/dev/cxgbe/iw_cxgbe/cm.c    Wed Apr 15 03:40:33 2020        
(r359952)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to