Thread (3 messages) flat view 3 messages, 3 authors, 3d ago

Re: [PATCH] net: dsa: mv88e6xxx: fix netdev reference leak on remove

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-09-16 12:09:46
Also in: lkml, stable

On Wed, Sep 16, 2026 at 10:03:40AM +0800, Guangshuo Li wrote:
mv88e6xxx_probe() uses the referenced network device provided through
platform data, but the remove path does not drop the corresponding
reference.

The probe failure path correctly calls dev_put() for pdata->netdev.
However, after a successful probe, mv88e6xxx_remove() tears down the
switch resources without releasing this reference, leaving the network
device reference count unbalanced after driver removal.

Call dev_put() in mv88e6xxx_remove() after the switch resources have
been torn down.
dev_put() and dev_get() should be used in pairs. Where is the
dev_get()?

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help