diff options
author | Sean Christopherson <seanjc@google.com> | 2025-05-22 16:52:15 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2025-06-23 09:50:56 -0700 |
commit | 86e00cd162a727c0b847def89bbd787c20eb8f5d (patch) | |
tree | 70bb3f43320af57c714b6cbbc9a0a24038423054 /tools/perf/scripts/python | |
parent | 5f8ca05ea99183ab2b69c7fd9617961211d194e7 (diff) |
KVM: Add irqfd to eventfd's waitqueue while holding irqfds.lock
Add an irqfd to its target eventfd's waitqueue while holding irqfds.lock,
which is mildly terrifying but functionally safe. irqfds.lock is taken
inside the waitqueue's lock, but if and only if the eventfd is being
released, i.e. that path is mutually exclusive with registration as KVM
holds a reference to the eventfd (and obviously must do so to avoid UAF).
This will allow using the eventfd's waitqueue to enforce KVM's requirement
that eventfd is assigned to at most one irqfd, without introducing races.
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250522235223.3178519-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions