summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorMatthew Wilcox2018-08-22 06:56:30 +0200
committerLinus Torvalds2018-08-22 19:52:47 +0200
commitc430d1e848ff1240d126e79780f3c26208b8aed9 (patch)
treeaa2c5cd32056e24e075310d950f4385203c7cc87 /kernel/sched
parentepoll: use the waitqueue lock to protect ep->wq (diff)
downloadkernel-qcow2-linux-c430d1e848ff1240d126e79780f3c26208b8aed9.tar.gz
kernel-qcow2-linux-c430d1e848ff1240d126e79780f3c26208b8aed9.tar.xz
kernel-qcow2-linux-c430d1e848ff1240d126e79780f3c26208b8aed9.zip
userfaultfd: use fault_wqh lock
The userfaultfd code currently uses the unlocked waitqueue helpers for managing fault_wqh, but instead of holding the waitqueue lock for this waitqueue around these calls, it the waitqueue lock of fault_pending_wq, which is a different waitqueue instance. Given that the waitqueue is not exposed to the rest of the kernel this actually works ok at the moment, but prevents the userfaultfd locking rules from being enforced using lockdep. Switch to the internally locked waitqueue helpers instead. This means that the lock inside fault_wqh now nests inside the fault_pending_wqh lock, but that's not a problem since it was entirely unused before. [hch@lst.de: slight changelog updates] [rppt@linux.vnet.ibm.com: spotted changelog spellos] Link: http://lkml.kernel.org/r/20171214152344.6880-3-hch@lst.de Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched')
0 files changed, 0 insertions, 0 deletions