Skip to content

net: usb: rtl8150: cleaning up races with ceasing IO

Oliver Neukum netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFT 0/2] net: usb: rtl8150: cleaning up races with ceasing IO

The driver has the fundamental issue that it uses a tasklet that reschedules itself and resubmits an URB, which in case of an error can schedule the tasklet and so on.
This cycle cannot be broken by adding primitives for cancelling tasklets and URBs but it also takes a flag preventing rescheduling or resubmission of tasklet and URB.

It turns out that this is quite complex because the issue hits in close(), suspend() and disconnect(). The required changes became so complex that I decided that this needs to be broken up in series of patches and needs testing.

V3: Added patches for close() and suspend() which Sashiko noted to be absent
V2: V2: Sashiko pointed out errors which conceptually arose from handling close() and disconnect() in the same way. Treating disconnect() separatly makes them go away