Re: [PATCH] net: dsa: vitesse-vsc73xx: Fix SPI device reference leak in vsc73xx_spi_probe()

From: Linus Walleij

Date: Fri Sep 18 2026 - 04:39:40 EST


On Fri, Sep 18, 2026 at 3:53 AM Andrew Lunn <andrew@xxxxxxx> wrote:
> On Fri, Sep 18, 2026 at 12:22:12AM +0200, Linus Walleij wrote:
> > On Thu, Sep 17, 2026 at 12:49 PM Wentao Liang <vulab@xxxxxxxxxxx> wrote:
> >
> > > spi_dev_get() takes a reference on the SPI device, but neither the
> > > probe error paths nor vsc73xx_spi_remove() ever release it, so the
> > > spi_device can never be freed after the driver has been unbound.
> > >
> > > Release the reference on both probe error paths and in remove().
> > >
> > > Fixes: 95711cd5f0b4 ("net: dsa: vsc73xx: Split vsc73xx driver")
> > > Cc: stable@xxxxxxxxxxxxxxx
> >
> > I think we don't set this on networking patches, the network maintainer
> > decides himself what is stable material.
>
> That was true when DaveM did all the Maintainer work. But it is no
> longer true. Please follow the normal stable rules.

Aha! I didn't know that.

Thanks Andrew.

Yours,
Linus Walleij