]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/hyperv: Fix error pointer dereference
authorEthan Tidmore <ethantidmore06@gmail.com>
Wed, 18 Feb 2026 19:09:03 +0000 (13:09 -0600)
committerWei Liu <wei.liu@kernel.org>
Wed, 18 Feb 2026 23:22:27 +0000 (23:22 +0000)
commit705d01c8d78121ee1634bfc602ac4b0ad1438fab
treed3ce99bc1956051f1244a1a500c547d2b5d2c8a6
parentfe9f15983c4823a8473e289b4a302946a4864ef5
x86/hyperv: Fix error pointer dereference

The function idle_thread_get() can return an error pointer and is not
checked for it. Add check for error pointer.

Detected by Smatch:
arch/x86/hyperv/hv_vtl.c:126 hv_vtl_bringup_vcpu() error:
'idle' dereferencing possible ERR_PTR()

Fixes: 2b4b90e053a29 ("x86/hyperv: Use per cpu initial stack for vtl context")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
arch/x86/hyperv/hv_vtl.c