Pass the RW-lock to be used when setting up callouts for the TCP stack.
This ensures that several lingering state checks can simply be removed.
MFC after: 1 week
Sponsored by: NVIDIA Networking
Differential D36622
tcp: Make all TCP timers start and stop atomically under the inp_lock (work in progress) • hselasky on Sep 18 2022, 9:01 AM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions I think this patch is in the right direction. Does it allow to assert that now tcp_freecb() is called only and only from tcp_discardcb()? Comment Actions glebius@ : I will test a bit first. I wasn't sure what is guaranteed to be called in which order, but I think you are right, that the additional stop of the timers you commented about is not needed. I just checked where the two flags checked are set (DROPPED and TIMEDWAIT), and stopped all timers from there, but I guess it can't be dropped before going into TIMEDWAIT first ... Comment Actions That's why I would prefer to not rush with your patch and go with my sequence of changes, that already is in the progress:
|