summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-roccat-pyra.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2013-10-04 09:29:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-20 11:06:12 -0800
commit2d9258e499abbbe55fb60a26995e378f2b51d513 (patch)
treed8be92adc241ffa02b12b261658b5fe808559728 /drivers/hid/hid-roccat-pyra.h
parentb0d4c0f8122abd6069312ccc20089d5c1c19c772 (diff)
IB/qib: Convert qib_user_sdma_pin_pages() to use get_user_pages_fast()
commit 603e7729920e42b3c2f4dbfab9eef4878cb6e8fa upstream. qib_user_sdma_queue_pkts() gets called with mmap_sem held for writing. Except for get_user_pages() deep down in qib_user_sdma_pin_pages() we don't seem to need mmap_sem at all. Even more interestingly the function qib_user_sdma_queue_pkts() (and also qib_user_sdma_coalesce() called somewhat later) call copy_from_user() which can hit a page fault and we deadlock on trying to get mmap_sem when handling that fault. So just make qib_user_sdma_pin_pages() use get_user_pages_fast() and leave mmap_sem locking for mm. This deadlock has actually been observed in the wild when the node is under memory pressure. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Roland Dreier <roland@purestorage.com> [Backported to 3.10: (Thanks to Ben Huthings) - Adjust context - Adjust indentation and nr_pages argument in qib_user_sdma_pin_pages()] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.h')
0 files changed, 0 insertions, 0 deletions