Re: [PATCH 1/1] mtd: spi-nor: core: Prevent oops during driver removal with active read or write operations
From: Michael Walle
Date: Wed Jul 16 2025 - 02:46:14 EST
Hi,
On Tue Jul 15, 2025 at 9:53 AM CEST, Khairul Anuar Romli wrote:
> > > - module_put(dev->driver->owner);
> > > + if (dev && dev->driver && dev->driver->owner)
> > > + module_put(dev->driver->owner);
> >
> > Why is dev->driver or dev->driver->owner NULL in the first place?
>
> When we remove/unbind the the spi node during busy, we will hit
> with dev->driver and dev->driver->owner NULL derefence.
Yes, but my question was why is this the case? I.e. why is
dev or dev->driver NULL?
-michael
Attachment:
signature.asc
Description: PGP signature