All of lore.kernel.org
 help / color / mirror / Atom feed
* sort out the lock order in the loop driver v2
@ 2021-08-26 13:38 Christoph Hellwig
  2021-08-26 13:38 ` [PATCH 1/8] cryptoloop: fix a sparse annotation Christoph Hellwig
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Christoph Hellwig @ 2021-08-26 13:38 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Hillf Danton, Tetsuo Handa, Pavel Tatashin,
	Reviewed-by : Tyler Hicks, linux-block

Hi Jens,

this series sorts out lock order reversals involving the block layer
open_mutex by drastically reducing the scope of loop_ctl_mutex.  To do
so it first merges the cryptoloop module into the main loop driver
as the unregistrtion of transfers on live loop devices was causing
some nasty locking interactions.

Changes since v1:
 - add a new patch to fix a pre-existing spare warning in the crypto code
 - initialize various struct loop_dev fields earlier
 - hold lo_mutex over lo_state updates
 - take loop_ctl_mutex to delete from the idr in the loop_add failure
   path

Diffstat:
 b/drivers/block/Kconfig    |    6 
 b/drivers/block/Makefile   |    1 
 b/drivers/block/loop.c     |  334 ++++++++++++++++++++++++---------------------
 b/drivers/block/loop.h     |   30 ----
 drivers/block/cryptoloop.c |  204 ---------------------------
 5 files changed, 189 insertions(+), 386 deletions(-)

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

end of thread, other threads:[~2021-08-28  5:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 13:38 sort out the lock order in the loop driver v2 Christoph Hellwig
2021-08-26 13:38 ` [PATCH 1/8] cryptoloop: fix a sparse annotation Christoph Hellwig
2021-08-26 13:38 ` [PATCH 2/8] loop: remove the unused idx argument to loop_control_get_free Christoph Hellwig
2021-08-26 13:38 ` [PATCH 3/8] loop: remove the ->ioctl method in loop_func_table Christoph Hellwig
2021-08-26 13:38 ` [PATCH 4/8] loop: return void from the ->release " Christoph Hellwig
2021-08-26 13:38 ` [PATCH 5/8] loop: merge the cryptoloop module into the main loop module Christoph Hellwig
2021-08-26 16:31   ` Milan Broz
2021-08-26 16:34     ` Christoph Hellwig
2021-08-26 16:44       ` Milan Broz
2021-08-27  6:45         ` Christoph Hellwig
2021-08-27 11:33           ` Tetsuo Handa
2021-08-27 15:38             ` Christoph Hellwig
2021-08-26 13:38 ` [PATCH 6/8] loop: devirtualize transfer transformations Christoph Hellwig
2021-08-26 13:38 ` [PATCH 7/8] loop: move loop device deletion out of loop_ctl_mutex Christoph Hellwig
2021-08-26 13:38 ` [PATCH 8/8] loop: avoid holding loop_ctl_mutex over add_disk Christoph Hellwig
2021-08-27  0:30 ` sort out the lock order in the loop driver v2 Tetsuo Handa
2021-08-27  6:40   ` Christoph Hellwig
2021-08-27  7:46     ` Tetsuo Handa
2021-08-27 15:34       ` Christoph Hellwig
     [not found] ` <20210827130259.2622-1-hdanton@sina.com>
2021-08-27 14:10   ` Tetsuo Handa
     [not found]   ` <20210828035114.2762-1-hdanton@sina.com>
2021-08-28  5:17     ` Tetsuo Handa

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.