Commit 4d62121c authored by Marc Zyngier's avatar Marc Zyngier
Browse files

KVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer



Dan reports that iterating over a device ITEs can legitimately lead
to a NULL pointer, and that the NULL check is placed *after* the
pointer has already been dereferenced.

Hoist the pointer check as early as possible and be done with it.

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Fixes: 30deb51a ("KVM: arm64: vgic-its: Add debugfs interface to expose ITS tables")
Link: https://lore.kernel.org/r/aDBylI1YnjPatAbr@stanley.mountain
Cc: Jing Zhang <jingzhangos@google.com>
Link: https://lore.kernel.org/r/20250530091647.1152489-1-maz@kernel.org


Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parent 07212d16
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment