diff options
| author | Andrew Jones <[email protected]> | 2025-02-17 08:45:10 +0000 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-02-17 10:58:28 +0000 |
| commit | 0611f78f83c93c000029ab01daa28166d03590ed (patch) | |
| tree | 65f2453837d5800fe49421cf112c1046a7f45b42 /net/unix/sysctl_net_unix.c | |
| parent | riscv: KVM: Fix hart suspend_type use (diff) | |
| download | kernel-0611f78f83c93c000029ab01daa28166d03590ed.tar.gz kernel-0611f78f83c93c000029ab01daa28166d03590ed.zip | |
riscv: KVM: Fix SBI IPI error generation
When an invalid function ID of an SBI extension is used we should
return not-supported, not invalid-param. Also, when we see that at
least one hartid constructed from the base and mask parameters is
invalid, then we should return invalid-param. Finally, rather than
relying on overflowing a left shift to result in zero and then using
that zero in a condition which [correctly] skips sending an IPI (but
loops unnecessarily), explicitly check for overflow and exit the loop
immediately.
Fixes: 5f862df5585c ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2")
Signed-off-by: Andrew Jones <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions
