diff options
| author | Yuntao Wang <[email protected]> | 2024-08-13 01:48:27 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2024-08-13 13:15:19 +0000 |
| commit | 0ecc5be200c84e67114f3640064ba2bae3ba2f5a (patch) | |
| tree | 7e45cbb9c5c7e74f4578850f2bf47c7c0c8f9644 /mm/sparse.c | |
| parent | Linux 6.11-rc3 (diff) | |
| download | kernel-0ecc5be200c84e67114f3640064ba2bae3ba2f5a.tar.gz kernel-0ecc5be200c84e67114f3640064ba2bae3ba2f5a.zip | |
x86/apic: Make x2apic_disable() work correctly
x2apic_disable() clears x2apic_state and x2apic_mode unconditionally, even
when the state is X2APIC_ON_LOCKED, which prevents the kernel to disable
it thereby creating inconsistent state.
Due to the early state check for X2APIC_ON, the code path which warns about
a locked X2APIC cannot be reached.
Test for state < X2APIC_ON instead and move the clearing of the state and
mode variables to the place which actually disables X2APIC.
[ tglx: Massaged change log. Added Fixes tag. Moved clearing so it's at the
right place for back ports ]
Fixes: a57e456a7b28 ("x86/apic: Fix fallout from x2apic cleanup")
Signed-off-by: Yuntao Wang <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/all/[email protected]
Diffstat (limited to 'mm/sparse.c')
0 files changed, 0 insertions, 0 deletions
