summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2026-06-27 11:51:05 +0100
committerMarc Zyngier <maz@kernel.org>2026-07-06 17:15:57 +0100
commit3a07249981629ace483ebbef81ef6b34c2d2afec (patch)
tree71182b6c2d6683d6ff6f780a7ac94bf41383eb0a /drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git
parentd098bb75d14fde2f12155f1a95ec0168160867ce (diff)
KVM: Move kvm_io_bus_get_dev() locking responsibilities to callers
kvm_io_bus_get_dev() returns a device that is only matched by the address, and nothing else. This can cause a lifetime issue if the matched device is not the expected type, as by the time the caller can introspect the object, it might be gone (the srcu lock having been dropped). Given that there is only a single user of this helper, the simplest option is to move the locking responsibility to the caller, which can keep the srcu lock held for as long as it wants. Note that this aligns with other kvm_io_bus*() helpers, which already require the srcu lock to be held by the callers. Reported-by: Will Deacon <will@kernel.org> Fixes: 8a39d00670f07 ("KVM: kvm_io_bus: Add kvm_io_bus_get_dev() call") Link: https://lore.kernel.org/all/20260626111344.802555-1-maz@kernel.org Cc: stable@vger.kernel.org Reviewed-by: Oliver Upton <oupton@kernel.org> Link: https://patch.msgid.link/20260627105105.1005990-1-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions