[PATCH 0/4] mtd: spi-nor: Fix RWW locking scheme

Miquel Raynal miquel.raynal at bootlin.com
Thu Nov 19 14:13:50 PST 2026


The RWW feature allows to read while a write is in flight, but its wait
logic was built on wait_event conditions that acquire a mutex. That is
not allowed, and breaks the wait semantics. The series reworks the
locking so the wait conditions only observe the bank state and the lock
is taken afterwards.

Link: https://sashiko.dev/#/patchset/20260811083111.403453-1-runyu.xiao%40seu.edu.cn

Two small preparatory patches keep the final change readable.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
Miquel Raynal (4):
      mtd: spi-nor: Return early in the non-RWW lock paths
      mtd: spi-nor: Factorize out the bank mask derivation
      mtd: spi-nor: Keep RWW wait conditions lockless
      mtd: spi-nor: Prevent KCSAN warnings in the RWW path

 drivers/mtd/spi-nor/core.c | 190 ++++++++++++++++++++++++++++++---------------
 1 file changed, 128 insertions(+), 62 deletions(-)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261119-macronix-upstreaming-spi-nor-rww-guard-80efb238eed5

Best regards,
-- 
Miquel Raynal <miquel.raynal at bootlin.com>




More information about the linux-mtd mailing list