]> git.baikalelectronics.ru Git - kernel.git/commit
dm mpath: fix ioctl deadlock when no paths
authorHannes Reinecke <hare@suse.de>
Wed, 10 Jul 2013 22:41:15 +0000 (23:41 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 10 Jul 2013 22:41:15 +0000 (23:41 +0100)
commit20a09f5a9eb3fb07e3bd73a3afd8f0a5110c586b
tree27971aeafbdd2410699e77477565157c67d8ffea
parentc96b444416394b316b552bc74f4b1ab4c64a5781
dm mpath: fix ioctl deadlock when no paths

When multipath needs to retry an ioctl the reference to the
current live table needs to be dropped. Otherwise a deadlock
occurs when all paths are down:
- dm_blk_ioctl takes a reference to the current table
  and spins in multipath_ioctl().
- A new table is being loaded, but upon resume the process
  hangs in dm_table_destroy() waiting for references to
  drop to zero.

With this patch the reference to the old table is dropped
prior to retry, thereby avoiding the deadlock.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-mpath.c
drivers/md/dm.c