RFC USB: UDC: Fix memory leaks by expanding the API
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | USB: UDC: Don't wipe deallocated memorydrivers/ | +3 | 4 replies | |
| 2/4 | USB: UDC: Expand device model API interfacedrivers/ include/ | +84 | 0 replies | |
| 3/4 | USB: UDC: net2280: Fix memory leaksdrivers/ drivers/ | +8 | 2 replies | |
| 4/4 | USB: UDC: net2272: Fix memory leaksdrivers/ drivers/ | +13 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/4] USB: UDC: Fix memory leaks by expanding the API
This series fixes some long-standing memory leaks in the net2280 and net2272 drivers. Along the way it expands the UDC/gadget API and addresses a stale pointer issue.
The real problem in net2280 and net2272 is that they need to do a bunch of cleanup operations using their private data structure after the gadget has been unregistered but before it is deallocated. The current API does not offer any way to do this, nor any way to perform setup operations after the gadget is initialized but before it is registered.
Patch 2/4 fixes this by enlarging the API. Using this new functionality, fixing the issues in the two UDC drivers is easy.
The stale pointer issue (patch 1/4) is related to the matter of re-registering a gadget multiple times, which is the subject of a separate email thread.
Alan Stern