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

eanut 6 jiakaipeanut at gmail.com
Sun Jan 25 03:46:37 PST 2026


Thanks, will address in v3.

Best regards,
Jiakai

Markus Elfring <Markus.Elfring at web.de> 于2026年1月25日周日 19:30写道:
>
>> > 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