All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Fix deadlock in ftl formating on mtd
@ 2021-06-13 11:30 ` Zhihao Cheng
  0 siblings, 0 replies; 20+ messages in thread
From: Zhihao Cheng @ 2021-06-13 11:30 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, chengzhihao1, yukuai3

There is an AA-deadlock problem while formating mtd device to generate
a ftl device. Fix it by reverting "mtd: allow to unload the mtdtrans
module if its block devices aren't open" recommended in [1].

[<0>] blktrans_open+0x47/0x340            LOCK(mtd_table_mutex)
[<0>] __blkdev_get+0x5b/0x3e0
[<0>] blkdev_get_by_dev+0x18f/0x370
[<0>] __device_add_disk+0x2db/0x700
[<0>] device_add_disk+0x17/0x20
[<0>] add_mtd_blktrans_dev+0x39e/0x6d0
[<0>] ftl_add_mtd+0x792/0x908 [ftl]
[<0>] register_mtd_blktrans+0xfb/0x170    LOCK(mtd_table_mutex)
[<0>] ftl_tr_init+0x18/0x1000 [ftl]
[<0>] do_one_initcall+0x71/0x330
[<0>] do_init_module+0xa6/0x350

[1] http://lists.infradead.org/pipermail/linux-mtd/2017-March/072899.html

Zhihao Cheng (6):
  Revert "mtd: blkdevs: fix potential deadlock + lockdep warnings"
  Revert "mtd: fix: avoid race condition when accessing mtd->usecount"
  Revert "mtd: mtd_blkdevs: don't increase 'open' count on error path"
  Revert "mtd: mtd_blkdevs: fix error path in blktrans_open"
  Revert "mtd: Remove redundant mutex from mtd_blkdevs.c"
  Revert "mtd: allow to unload the mtdtrans module if its block devices
    aren't open"

 drivers/mtd/mtd_blkdevs.c | 77 +++++++++++++++------------------------
 1 file changed, 30 insertions(+), 47 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-06-15 18:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13 11:30 [PATCH 0/6] Fix deadlock in ftl formating on mtd Zhihao Cheng
2021-06-13 11:30 ` Zhihao Cheng
2021-06-13 11:30 ` [PATCH 1/6] Revert "mtd: blkdevs: fix potential deadlock + lockdep warnings" Zhihao Cheng
2021-06-13 11:30   ` Zhihao Cheng
2021-06-13 11:30 ` [PATCH 2/6] Revert "mtd: fix: avoid race condition when accessing mtd->usecount" Zhihao Cheng
2021-06-13 11:30   ` Zhihao Cheng
2021-06-13 11:30 ` [PATCH 3/6] Revert "mtd: mtd_blkdevs: don't increase 'open' count on error path" Zhihao Cheng
2021-06-13 11:30   ` Zhihao Cheng
2021-06-13 11:30 ` [PATCH 4/6] Revert "mtd: mtd_blkdevs: fix error path in blktrans_open" Zhihao Cheng
2021-06-13 11:30   ` Zhihao Cheng
2021-06-13 11:30 ` [PATCH 5/6] Revert "mtd: Remove redundant mutex from mtd_blkdevs.c" Zhihao Cheng
2021-06-13 11:30   ` Zhihao Cheng
2021-06-13 11:30 ` [PATCH 6/6] Revert "mtd: allow to unload the mtdtrans module if its block devices aren't open" Zhihao Cheng
2021-06-13 11:30   ` Zhihao Cheng
2021-06-13 15:12 ` [PATCH 0/6] Fix deadlock in ftl formating on mtd Miquel Raynal
2021-06-13 15:12   ` Miquel Raynal
2021-06-15  9:02   ` Zhihao Cheng
2021-06-15  9:02     ` Zhihao Cheng
2021-06-15  9:08   ` Zhihao Cheng
2021-06-15  9:08     ` Zhihao Cheng

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.