From: Miquel Raynal <miquel.raynal@bootlin.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] mtd: take a reference when opening an unpartitioned master
Date: Fri, 04 Dec 2026 22:37:51 +0100 [thread overview]
Message-ID: <87y0a44ths.fsf@bootlin.com> (raw)
In-Reply-To: <20261120-submit-mtd-master-open-reference-v1-v2-1-5c2e2ede4ea7@gmail.com> (James Hilliard's message of "Fri, 20 Nov 2026 09:01:35 -0700")
On 20/11/2026 at 09:01:35 -07, James Hilliard <james.hilliard1@gmail.com> wrote:
> With CONFIG_MTD_PARTITIONED_MASTER disabled, a flash device with no
> partitions still gets a /dev/mtdX node. Opening that node does not take
> a reference on the master MTD. If the driver unregisters the flash
> before the file is closed, the core can unregister the MTD device and
> its NVMEM provider while the file is still open.
>
> Take a master reference for a handle on the master and drop it when the
> handle is released. A handle on a partition still takes a master
> reference only when CONFIG_MTD_PARTITIONED_MASTER is enabled.
>
> Fixes: 264725e35fbc ("mtd: Clean refcounting with MTD_PARTITIONED_MASTER")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Guess what, doesn't apply either.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] mtd: take a reference when opening an unpartitioned master
Date: Fri, 04 Dec 2026 22:37:51 +0100 [thread overview]
Message-ID: <87y0a44ths.fsf@bootlin.com> (raw)
In-Reply-To: <20261120-submit-mtd-master-open-reference-v1-v2-1-5c2e2ede4ea7@gmail.com> (James Hilliard's message of "Fri, 20 Nov 2026 09:01:35 -0700")
On 20/11/2026 at 09:01:35 -07, James Hilliard <james.hilliard1@gmail.com> wrote:
> With CONFIG_MTD_PARTITIONED_MASTER disabled, a flash device with no
> partitions still gets a /dev/mtdX node. Opening that node does not take
> a reference on the master MTD. If the driver unregisters the flash
> before the file is closed, the core can unregister the MTD device and
> its NVMEM provider while the file is still open.
>
> Take a master reference for a handle on the master and drop it when the
> handle is released. A handle on a partition still takes a master
> reference only when CONFIG_MTD_PARTITIONED_MASTER is enabled.
>
> Fixes: 264725e35fbc ("mtd: Clean refcounting with MTD_PARTITIONED_MASTER")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Guess what, doesn't apply either.
next prev parent reply other threads:[~2026-12-04 21:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 16:01 [PATCH v2] mtd: take a reference when opening an unpartitioned master James Hilliard
2026-11-20 16:01 ` James Hilliard
2026-12-04 21:37 ` Miquel Raynal [this message]
2026-12-04 21:37 ` Miquel Raynal
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=87y0a44ths.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=james.hilliard1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=stable@vger.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.