]> git.baikalelectronics.ru Git - kernel.git/commit
x86/apic/vector: Handle vector release on CPU unplug correctly
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 Feb 2018 11:08:06 +0000 (12:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 23 Feb 2018 07:02:00 +0000 (08:02 +0100)
commit417c7ca0adcf5e70e0b1e01484322d323f74dfe8
treeebec102e04acad9e894548422959b8be3300e69c
parenta6a18ed2f7a8864f20d91c9f4db92593db46e1f5
x86/apic/vector: Handle vector release on CPU unplug correctly

When a irq vector is replaced, then the previous vector is normally
released when the first interrupt happens on the new vector. If the target
CPU of the previous vector is already offline when the new vector is
installed, then the previous vector is silently discarded, which leads to
accounting issues causing suspend failures and other problems.

Adjust the logic so that the previous vector is freed in the underlying
matrix allocator to ensure that the accounting stays correct.

Fixes: d95d6acf7e2e ("x86/vector: Use matrix allocator for vector assignment")
Reported-by: Yuriy Vostrikov <delamonpansie@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Yuriy Vostrikov <delamonpansie@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180222112316.930791749@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/apic/vector.c