xtensa: iss/network initialization error path fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 of 3 patches 0 repliesNew
2 of 3 patches are in this archive. The cover letter announces 3.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | xtensa: iss/network: drop 'devices' listarch/ | +3 | 0 replies | |
| 2/3 | xtensa: iss/network: provide release() callbackarch/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] xtensa: iss/network initialization error path fixes
Hello,
this series cleans up xtensa ISS network driver and fixes memory leaks in initialization error paths.
The series was prompted by the patch [1] from Yang Yingliang, but that patch alone has issues:
- a newly created net_device was added to a list of devices and not removed from it in case of error leading to UAF. The way the device list was used in the driver doesn't make much sense, so patch 1 removes it altogether.
- a call to platform_device_unregister would complain that iss-netdev does not have a release() function and must be fixed. Patch 2 adds the release function for the iss-netdev platform device.
- a proper release() function for the platform device must free the net_device object, so the error path that calls platform_device_unregister must not call free_netdev afterwards to avoid double free. I've modified the patch 3 so that it does that and updated the description.
[1] https://lore.kernel.org/lkml/[email protected]/
Max Filippov (2):
xtensa: iss/network: drop 'devices' list
xtensa: iss/network: provide release() callback
Yang Yingliang (1):
xtensa: iss: fix handling error cases in iss_net_configure()
arch/xtensa/platforms/iss/network.c | 63 +++++++++++++---------------- 1 file changed, 28 insertions(+), 35 deletions(-)
Signature · 1 line
2.30.2