From: Josh Durgin Date: Tue, 1 Oct 2013 00:09:54 +0000 (-0700) Subject: rbd: move calls that may sleep out of spin lock range X-Git-Tag: omap-for-v3.16/fixes-against-rc1~24^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77f33c03739697d01c2e730e4c2610424059ceaf;p=pandora-kernel.git rbd: move calls that may sleep out of spin lock range 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 Reviewed-by: Alex Elder --- Reading git-diff-tree failed