The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Runyu Xiao" <runyu.xiao@seu.edu.cn>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Pratyush Yadav" <pratyush@kernel.org>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>, <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH v2] mtd: spi-nor: scope the exclusive RWW lock
Date: Tue, 11 Aug 2026 10:50:03 +0200	[thread overview]
Message-ID: <DKLZHP07AA40.X5MMIPHUZEVX@kernel.org> (raw)
In-Reply-To: <20260811041349.333176-1-runyu.xiao@seu.edu.cn>

Hi,

On Tue Aug 11, 2026 at 6:13 AM CEST, Runyu Xiao wrote:
> spi_nor_rww_start_exclusive() is used as the wait_event_killable()
> condition for RWW access. When RWW is busy, it can return false while
> still holding nor->lock, which blocks spi_nor_rww_end_exclusive() from
> clearing the RWW state.
>
> Use guard(mutex) here so nor->lock is released before the condition
> returns, while the state flags still hand off ownership to the caller.
> This keeps the mutex scope aligned with the other RWW start helpers.
>
> Fixes: 03e7bb864d9a ("mtd: spi-nor: use scope-based mutex cleanup helpers")
> Cc: stable@vger.kernel.org
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>

There were questions in v1. Please answer them. Don't just ignore
them and just throw a new version of your patch at us. We put time
and effort into maintaining. See also [1].

-michael

[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html

  parent reply	other threads:[~2026-08-11  8:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09  8:42 [PATCH] mtd: spi-nor: scope the exclusive RWW lock Runyu Xiao
2026-08-10  8:25 ` Michael Walle
2026-08-10 12:47   ` Miquel Raynal
2026-08-11  4:13   ` [PATCH v2] " Runyu Xiao
2026-08-11  7:51     ` Miquel Raynal
2026-08-11  8:31     ` [PATCH v3] mtd: spi-nor: use guard() in spi_nor_rww_start_exclusive Runyu Xiao
2026-08-11  8:41       ` Miquel Raynal
2026-08-11 10:11       ` Tudor Ambarus
2026-08-11 10:42         ` Tudor Ambarus
2026-08-11 14:36           ` Miquel Raynal
2026-08-11 15:38             ` Miquel Raynal
2026-08-11  8:50     ` Michael Walle [this message]
2026-08-11 10:05   ` [PATCH] mtd: spi-nor: scope the exclusive RWW lock Tudor Ambarus

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=DKLZHP07AA40.X5MMIPHUZEVX@kernel.org \
    --to=mwalle@kernel.org \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=stable@vger.kernel.org \
    --cc=tudor.ambarus@linaro.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