Re: [PATCH] mtd: mtdswap: Avoid freeing registered blktrans device twice

Miquel Raynal <[email protected]>
Newsgroups org.infradead.lists.linux-mtd,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed, 08 Jul 2026 22:33:55 +0800, Ruoyu Wang wrote:
> In mtdswap_add_mtd(), debugfs setup failure after successful blktrans
> registration can free mbd_dev twice.
> 
> add_mtd_blktrans_dev() initializes the blktrans device reference and
> publishes the disk. Once that succeeds, del_mtd_blktrans_dev() tears the
> disk down and drops the blktrans reference; when that reference reaches
> zero, blktrans_dev_release() frees the mtd_blktrans_dev.
> 
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: mtdswap: Avoid freeing registered blktrans device twice
      commit: 779aa4c66a96bf43d2d62982ea1a9096a9128d87

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.