diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-12-01 13:26:58 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-01 14:40:52 +0100 |
commit | 31f8a651fc5784a9e6f482be5ef0dd111a535e88 (patch) | |
tree | 3e1f3404a4e93e6453946390043aeda4bff190fc /arch/x86/power/cpu.c | |
parent | b836554386cc77f31ab43a8492a2587e0c51d51e (diff) | |
download | op-kernel-dev-31f8a651fc5784a9e6f482be5ef0dd111a535e88.zip op-kernel-dev-31f8a651fc5784a9e6f482be5ef0dd111a535e88.tar.gz |
x86/tsc: Validate cpumask pointer before accessing it
0-day testing encountered a NULL pointer dereference in a cpumask access
from tsc_store_and_check_tsc_adjust().
This happens when the function is called on the boot CPU and the topology
masks are not yet available due to CPUMASK_OFFSTACK=y.
Add a NULL pointer check for the mask pointer. If NULL it's safe to assume
that the CPU is the boot CPU and the first one in the package.
Fixes: 8b223bc7abe0 ("x86/tsc: Store and check TSC ADJUST MSR")
Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/power/cpu.c')
0 files changed, 0 insertions, 0 deletions