mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 17:49:03 +02:00
xen_read_msr_safe() currently passes an uninitialized argument 'err' to xen_do_read_msr(). But as xen_do_read_msr() may not set the argument, xen_read_msr_safe() could return err with an unpredictable value. To ensure correctness, initialize err to 0 (representing success) in xen_read_msr_safe(). Do the same in xen_read_msr(), even err is not used after being passed to xen_do_read_msr(). Closes: https://lore.kernel.org/xen-devel/aBxNI_Q0-MhtBSZG@stanley.mountain/ Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Xin Li (Intel) <xin@zytor.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Juergen Gross <jgross@suse.com> Cc: H. Peter Anvin <hpa@zytor.com> Link: https://lore.kernel.org/r/20250517165713.935384-1-xin@zytor.com |
||
|---|---|---|
| .. | ||
| apic.c | ||
| debugfs.c | ||
| efi.c | ||
| enlighten.c | ||
| enlighten_hvm.c | ||
| enlighten_pv.c | ||
| enlighten_pvh.c | ||
| grant-table.c | ||
| irq.c | ||
| Kconfig | ||
| Makefile | ||
| mmu.c | ||
| mmu_hvm.c | ||
| mmu_pv.c | ||
| multicalls.c | ||
| p2m.c | ||
| platform-pci-unplug.c | ||
| pmu.c | ||
| setup.c | ||
| smp.c | ||
| smp_hvm.c | ||
| smp_pv.c | ||
| spinlock.c | ||
| suspend.c | ||
| suspend_hvm.c | ||
| suspend_pv.c | ||
| time.c | ||
| trace.c | ||
| vga.c | ||
| xen-asm.S | ||
| xen-head.S | ||
| xen-ops.h | ||