lkml.org 
[lkml]   [2021]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH RFC 0/2] x86/apic: Avoid cm->allocated going negative in irq_matrix
Date
I discovered that CPU0 offlining/onlining works only once:

# echo 0 > /sys/devices/system/cpu/cpu0/online
# echo 1 > /sys/devices/system/cpu/cpu0/online
# echo 0 > /sys/devices/system/cpu/cpu0/online
-bash: echo: write error: No space left on device

with the following in dmesg:

[ ... ] CPU 0 has 4294967295 vectors, 589 available. Cannot disable CPU

And the problem seems to be that irq_matrix_assign()/irq_matrix_free() calls
for PIC_CASCADE_IR are unbalanced, making cm->allocated go negative.

RFC as I didn't quite get why we're making an exception for PIC_CASCADE_IR in
the first place. Surely it is special, but for the sake of consistency we'd
better not treat it as such. Or maybe I just misunderstood everythin.

Vitaly Kuznetsov (2):
x86/apic: Do not make an exception for PIC_CASCADE_IR when marking
legacy irqs in irq_matrix
genirq/matrix: WARN_ON_ONCE() when cm->allocated/m->total_allocated go
negative

arch/x86/kernel/apic/vector.c | 3 +--
kernel/irq/matrix.c | 11 +++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)

--
2.29.2

\
 
 \ /
  Last update: 2021-02-19 12:33    [W:0.084 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site