[PATCH v2] RISC-V: KVM: Fix null pointer dereference in kvm_riscv_aia_imsic_has_attr

Markus Elfring Markus.Elfring at web.de
Sun Jan 25 03:30:08 PST 2026


…
> The fix adds a check to return -ENODEV if imsic_state is NULL, which
> is consistent with other error handling in the function and prevents
> the null pointer dereference.

How do you think about to move the assignment for the local variable “isel”
behind this check by another update step?
https://elixir.bootlin.com/linux/v6.19-rc5/source/arch/riscv/kvm/aia_imsic.c#L982-L999


> v2: add Fixes tag and drop external link as suggested.

Please move a patch version description behind the marker line.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc6#n785


Would it be helpful to append parentheses to a function name also in the summary phrase?

Regards,
Markus



More information about the linux-riscv mailing list