[<prev] [next>] [day] [month] [year] [list]
Message-Id: <DBD9ZQ7GV4YY.PLA885RZGBDV@kernel.org>
Date: Wed, 16 Jul 2025 08:46:02 +0200
From: "Michael Walle" <mwalle@...nel.org>
To: "Romli, Khairul Anuar" <khairul.anuar.romli@...era.com>, "Tudor Ambarus"
<tudor.ambarus@...aro.org>, "Pratyush Yadav" <pratyush@...nel.org>, "Miquel
Raynal" <miquel.raynal@...tlin.com>, "Richard Weinberger" <richard@....at>,
"Vignesh Raghavendra" <vigneshr@...com>, "open list:SPI NOR SUBSYSTEM"
<linux-mtd@...ts.infradead.org>, "open list"
<linux-kernel@...r.kernel.org>, "Gerlach, Matthew"
<matthew.gerlach@...era.com>
Subject: Re: [PATCH 1/1] mtd: spi-nor: core: Prevent oops during driver
removal with active read or write operations
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
Download attachment "signature.asc" of type "application/pgp-signature" (298 bytes)
Powered by blists - more mailing lists