>> //Initialize time wait socket and setup timer >> inet_twsk_alloc() tw_refcnt = 0 >> __inet_twsk_hashdance() tw_refcnt = 3 >> inet_twsk_schedule() tw_refcnt = 4 >> inet_twsk_put() tw_refcnt = 3 >> >> //Receive packet 1 in timewait state >> tcp_timewait_state_process() -> inet_twsk_schedule tw_refcnt = 3 (no >> change) > > This is obviously wrong. > > If a timewait socket is found, do we increment its refcnt before > proceeding. We do not increment refcount currently when we find a timewait socket.
> I've received some private mails about tw issues, that turned to be > caused by buggy drivers or buggy arch specific code. > > Are you crashed observed on x86 ? > This is observed on ARM devices. In the current debug, all time wait socket refcount changes were happening in TCP stack only and there was no platform / driver code involved. According to my understanding, we would need to increment the time wait socket refcount first before proceeding with any subsequent operations. However, I request your expert opinion on this. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html