From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rosen Penev <rosenp@gmail.com>,
Thomas Gleixner <tglx@kernel.org>,
Sean MacLennan <smaclennan@pikatech.com>,
David Woodhouse <David.Woodhouse@intel.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] mtd: rawnand: ndfc: fix I/O mapping leak on remove
Date: Fri, 25 Sep 2026 15:33:02 +0200 [thread overview]
Message-ID: <87qzih4fsh.fsf@bootlin.com> (raw)
In-Reply-To: <20260915164204.2492099-1-lgs201920130244@gmail.com> (Guangshuo Li's message of "Wed, 16 Sep 2026 00:42:04 +0800")
On 16/09/2026 at 00:42:04 +08, Guangshuo Li <lgs201920130244@gmail.com> wrote:
> ndfc_probe() maps the controller registers with of_iomap(), but the
> remove path does not call the matching iounmap() before the driver is
> removed.
>
> If ndfc_chip_init() fails, the probe error path correctly unmaps
> ndfc->ndfcbase. However, after a successful probe, the mapping remains
> active for the lifetime of the device and ndfc_remove() never releases
> it, leaking the I/O mapping on driver unbind.
>
> Call iounmap() in ndfc_remove() after the NAND device cleanup to release
> the controller register mapping.
>
> This issue was found by manual code inspection.
>
> Fixes: a808ad3b0d28 ("[MTD] [NAND] ndfc driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
No longer applies after Rosen Penev's patch, can you please rebase on top?
Thanks,
Miquèl
prev parent reply other threads:[~2026-09-25 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 16:42 Guangshuo Li
2026-09-25 13:33 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87qzih4fsh.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=David.Woodhouse@intel.com \
--cc=lgs201920130244@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=rosenp@gmail.com \
--cc=smaclennan@pikatech.com \
--cc=stable@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®