diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2020-10-27 13:55:21 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-23 10:47:59 +0200 |
commit | b731fc0028296bdf8f510394aba4dacd10dea20d (patch) | |
tree | 7ab4a434d0b30b0d3097aeb1a3248ac8f2491c3c /fs/debugfs/inode.c | |
parent | 89d2fc71b9f05970a3cc9b9ea2a44e3c389b45eb (diff) | |
download | linux-stable-b731fc0028296bdf8f510394aba4dacd10dea20d.tar.gz linux-stable-b731fc0028296bdf8f510394aba4dacd10dea20d.tar.bz2 linux-stable-b731fc0028296bdf8f510394aba4dacd10dea20d.zip |
eventfd: Export eventfd_ctx_do_read()
[ Upstream commit 28f1326710555bbe666f64452d08f2d7dd657cae ]
Where events are consumed in the kernel, for example by KVM's
irqfd_wakeup() and VFIO's virqfd_wakeup(), they currently lack a
mechanism to drain the eventfd's counter.
Since the wait queue is already locked while the wakeup functions are
invoked, all they really need to do is call eventfd_ctx_do_read().
Add a check for the lock, and export it for them.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Message-Id: <20201027135523.646811-2-dwmw2@infradead.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Stable-dep-of: 758b49204781 ("eventfd: prevent underflow for eventfd semaphores")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/debugfs/inode.c')
0 files changed, 0 insertions, 0 deletions