These drivers allocate memory or request interrupts with devm in
ndo_open or in the line discipline open, so every open leaves them
behind until the device is unbound. In sxgbe every open after the
first one then fails with -EBUSY.
I found this with spec2patch. I model-checked the probe and remove paths
of the driver with CBMC against formal specifications of the kernel APIs
it calls. The specifications are checked against the kernel source, and
some of them are proved in Rocq against a transcription of the kernel
code. I also checked lock usage separately. With the help of an AI
coding assistant (Claude); I reviewed the analysis and the fix.
Compile-tested only, not tested on hardware.
The other 2014 sxgbe authors' addresses are no longer valid, so they are
not in Cc.
To: Niklas Söderlund <nikl…@ragnatech.se>
---
Arina Kharlamova (5):
net: rtsn: fix irq name leak in rtsn_request_irq()
net: sxgbe: free the interrupts in sxgbe_release()
net: sxgbe: free the TX ring arrays in free_tx_ring()
net: ll_temac: fix rx_skb leak in temac_dma_bd_init()
nfc: nfcmrvl: do not use devres for the reset GPIO
drivers/net/ethernet/renesas/rtsn.c | 13 +++---
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 60 +++++++++++++++++--------
drivers/net/ethernet/xilinx/ll_temac_main.c | 8 ++--
drivers/nfc/nfcmrvl/main.c | 9 +++-
drivers/nfc/nfcmrvl/uart.c | 15 +++----
5 files changed, 67 insertions(+), 38 deletions(-)
---
base-commit: c712df600d056cc35ef7621e43c8e12513bae886
change-id: 20261201-s2p-lpr-net-fffd7804d1b3
Best regards,
--
Arina Kharlamova <arin…@mbzuai.ac.ae>
[PATCH net 0/5] net: free per-open allocations and interrupts
- From
- devn…@kernel.org (Arina Kharlamova via B4 Relay)
- Organization
- Usenet Network
- Message-ID
- <2026…@mbzuai.ac.ae>
- Date
- Newsgroups
- linux.kernel.netdev