All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Stefan Agner" <stefan@agner.ch>, "Lucas Stach" <dev@lynxeye.de>,
	"Thierry Reding" <thierry.reding@kernel.org>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Boris Brezillon" <bbrezillon@kernel.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: tegra: drain the IRQ before disabling the clock
Date: Mon, 09 Nov 2026 19:59:08 +0000	[thread overview]
Message-ID: <sashiko-outbox-205518@kernel.org> (raw)
In-Reply-To: <20261108-submit-tegra-nand-irq-teardown-v1-v1-1-2c570ad4a22c@gmail.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] mtd: rawnand: tegra: device_node reference leak in
  tegra_nand_chips_init() [1]
--

commit 365a7f4452b91b6f2d3ef6a05d0bebfa1d8aca1e
Author: James Hilliard <james.hilliard1@gmail.com>

mtd: rawnand: tegra: drain the IRQ before disabling the clock

This commit masks controller interrupts and frees the managed IRQ before
suspending the device on driver removal and probe failure.

> diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
> index 7f9eb5f042a7e..1104d75b6cbe6 100644
> --- a/drivers/mtd/nand/raw/tegra_nand.c
> +++ b/drivers/mtd/nand/raw/tegra_nand.c
> @@ -1212,10 +1212,13 @@ static int tegra_nand_probe(struct platform_device *pdev)
>  
>  	err = tegra_nand_chips_init(ctrl->dev, ctrl);
>  	if (err)
> -		goto err_put_pm;
> +		goto err_free_irq;

[Severity: Medium]
This problem wasn't introduced by this patch, but does
tegra_nand_chips_init() leak the np_nand device_node reference [1]?
It acquires the child node with of_get_next_child(np, NULL) and never calls
of_node_put() on either its error paths or normal return, leaking a
reference on every probe attempt.

[1] https://sashiko.dev/#/bug/linux-3f05aa6b-f889-4376-97fb-0f7f06b4e683

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261108-submit-tegra-nand-irq-teardown-v1-v1-1-2c570ad4a22c@gmail.com?part=1

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2026-11-09 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08 21:05 [PATCH] mtd: rawnand: tegra: drain the IRQ before disabling the clock James Hilliard
2026-11-08 21:05 ` James Hilliard
2026-11-09 19:59 ` sashiko-bot [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=sashiko-outbox-205518@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bbrezillon@kernel.org \
    --cc=dev@lynxeye.de \
    --cc=digetx@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=stefan@agner.ch \
    --cc=thierry.reding@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.