aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mm_init.c
diff options
context:
space:
mode:
authorXin Li (Intel) <[email protected]>2025-05-17 16:57:12 +0000
committerIngo Molnar <[email protected]>2025-05-21 06:44:31 +0000
commite95534e107d2e9e136aa4d7cbededb3827e80074 (patch)
tree3b6df10f47e9951ea13cda291f0dcf079694d4ea /mm/mm_init.c
parentx86/msr: Remove a superfluous inclusion of <asm/asm.h> (diff)
downloadkernel-e95534e107d2e9e136aa4d7cbededb3827e80074.tar.gz
kernel-e95534e107d2e9e136aa4d7cbededb3827e80074.zip
x86/xen/msr: Fix uninitialized variable 'err'
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/[email protected]/ Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Xin Li (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Cc: H. Peter Anvin <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'mm/mm_init.c')
0 files changed, 0 insertions, 0 deletions