+18
−11
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
get_user() and set_disk_ro() may allocate memory, leading to a potential deadlock if theye are called while a spin lock is held. Move the acquisition and release of rbd_dev->lock from rbd_ioctl() into rbd_ioctl_set_ro(), so it can occur between get_user() and set_disk_ro(). Signed-off-by:Josh Durgin <josh.durgin@inktank.com> Reviewed-by:
Alex Elder <elder@linaro.org>