]> git.baikalelectronics.ru Git - kernel.git/commit
userfaultfd: disable irqs when taking the waitqueue lock
authorChristoph Hellwig <hch@lst.de>
Fri, 26 Oct 2018 22:02:19 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Oct 2018 23:25:18 +0000 (16:25 -0700)
commitccba8249863066c76b17e2d6f1bcc2c77b2e0055
treef91def5f8e72340a5ebafa664fe296c965a96b9a
parente97ce96950fdc73cee435549c5d9e96135c55f2d
userfaultfd: disable irqs when taking the waitqueue lock

userfaultfd contains howe-grown locking of the waitqueue lock, and does
not disable interrupts.  This relies on the fact that no one else takes it
from interrupt context and violates an invariat of the normal waitqueue
locking scheme.  With aio poll it is easy to trigger other locks that
disable interrupts (or are called from interrupt context).

Link: http://lkml.kernel.org/r/20181018154101.18750-1-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org> [4.19.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/userfaultfd.c