usbip: usbip_host: remove legacy rebind_store in favor of drivers_probe
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest posting 2/20 of 2 patches 1 replyIn review
- v3 posting 1/22 patches 6 repliesSuperseded
- v2 posting 3/31 patch 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 posting 2/3 | 1 patch | 2 replies | Superseded | |
| v2 posting 1/3 | 1 patch | 1 reply | Superseded | |
| v1 | 1 patch | 5 replies | Superseded |
Patches in v3 posting 2/2 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 v3 yet.
Cover letter [PATCH v3 0/2] usbip: usbip_host: remove legacy rebind_store in favor of drivers_probe
Quoted 13 lines · Jeffin Philip
do_rebind, which sleeps normally gets a mutex lock. However, it does not or should I say, cannot check for null udev between spin lock dropped inrebind_storeand enteringdo_rebind. This is a potential race window already. So, even if we check for null udev under spinlock, we cannot do it outside. Regardingdo_rebind, it is called duringstub_device_rebind, but that function is called during module exit when all files are removed. So,do_rebindis not designed to work in a concurrent environment in the first place.We have a safer function that can already do what
do_rebinddoes,drivers_probe. So, we usedrivers_probeto rebind the device rather than userebind_store.
Quoted 8 lines
usbip tool references this function immediately after the device is unbound, which is safe for the tool itself but since we opted for
drivers_probe, fix it by usingdrivers_proberather thanrebind_storeafter unbinding device which is more safer.Tested and working in both userspace via the tool and manually echoing the busid in the related nodes. rebind node is still left active with a warning to use
drivers_probeupon encounteringrebind_store.
Friendly ping. Let me know if you want me to change anything.
Thanks,
Jeffin.