• Hannes Reinecke's avatar
    dm mpath: fix ioctl deadlock when no paths · 6c182cd8
    Hannes Reinecke authored
    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: default avatarHannes Reinecke <hare@suse.de>
    Cc: Mike Snitzer <snitzer@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    6c182cd8
dm-mpath.c 40.8 KB