summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2020-03-13 11:20:51 +0100
committerIlya Dryomov <idryomov@gmail.com>2020-04-13 08:55:49 +0200
commit0e4e1de5b63fa423b13593337a27fd2d2b0bcf77 (patch)
tree8abbb9cb2d0db92749231abb3214c5b2699dd11c /tools
parentLinux 5.7-rc1 (diff)
downloadlinux-0e4e1de5b63fa423b13593337a27fd2d2b0bcf77.tar.xz
linux-0e4e1de5b63fa423b13593337a27fd2d2b0bcf77.zip
rbd: avoid a deadlock on header_rwsem when flushing notifies
rbd_unregister_watch() flushes notifies and therefore cannot be called under header_rwsem because a header update notify takes header_rwsem to synchronize with "rbd map". If mapping an image fails after the watch is established and a header update notify sneaks in, we deadlock when erroring out from rbd_dev_image_probe(). Move watch registration and unregistration out of the critical section. The only reason they were put there was to make header_rwsem management slightly more obvious. Fixes: 811c66887746 ("rbd: fix rbd map vs notify races") Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions