All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Lucas De Marchi <demarchi@kernel.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: intel-dg: Fix runtime PM error path in probe
Date: Tue, 7 Jul 2026 09:57:47 +0200	[thread overview]
Message-ID: <akyxe9FteNZRULWD@black.igk.intel.com> (raw)
In-Reply-To: <20260705033107.276450-1-lgs201920130244@gmail.com>

On Sun, Jul 05, 2026 at 11:31:07AM +0800, Guangshuo Li wrote:
> intel_dg_mtd_probe() allocates region names before enabling runtime PM
> and before calling pm_runtime_resume_and_get().
> 
> If kasprintf() fails while building a region name, the error path jumps
> to err, which calls pm_runtime_put(). At that point there has not been a
> successful pm_runtime_resume_and_get() call to balance, so the runtime PM
> usage count can underflow.
> 
> Jump to err_norpm from the kasprintf() failure path, as the runtime PM
> reference has not been acquired yet.
> 
> Fixes: 779c59274d03 ("mtd: intel-dg: Fix accessing regions before setting nregions")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>

Reviewed-by: Raag Jadav <raag.jadav@intel.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Raag Jadav <raag.jadav@intel.com>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Lucas De Marchi <demarchi@kernel.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: intel-dg: Fix runtime PM error path in probe
Date: Tue, 7 Jul 2026 09:57:47 +0200	[thread overview]
Message-ID: <akyxe9FteNZRULWD@black.igk.intel.com> (raw)
In-Reply-To: <20260705033107.276450-1-lgs201920130244@gmail.com>

On Sun, Jul 05, 2026 at 11:31:07AM +0800, Guangshuo Li wrote:
> intel_dg_mtd_probe() allocates region names before enabling runtime PM
> and before calling pm_runtime_resume_and_get().
> 
> If kasprintf() fails while building a region name, the error path jumps
> to err, which calls pm_runtime_put(). At that point there has not been a
> successful pm_runtime_resume_and_get() call to balance, so the runtime PM
> usage count can underflow.
> 
> Jump to err_norpm from the kasprintf() failure path, as the runtime PM
> reference has not been acquired yet.
> 
> Fixes: 779c59274d03 ("mtd: intel-dg: Fix accessing regions before setting nregions")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>

Reviewed-by: Raag Jadav <raag.jadav@intel.com>

  reply	other threads:[~2026-07-07  7:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05  3:31 [PATCH] mtd: intel-dg: Fix runtime PM error path in probe Guangshuo Li
2026-07-05  3:31 ` Guangshuo Li
2026-07-07  7:57 ` Raag Jadav [this message]
2026-07-07  7:57   ` Raag Jadav

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=akyxe9FteNZRULWD@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=alexander.usyskin@intel.com \
    --cc=demarchi@kernel.org \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --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.