Re: [QUESTION] is vector_lock needed in apic_retrigger_irq() ?

From: Thomas Gleixner

Date: Wed Feb 18 2026 - 15:50:08 EST


On Tue, Feb 17 2026 at 22:08, Thomas Gleixner wrote:
> On Mon, Feb 16 2026 at 21:44, Luigi Rizzo wrote:
>> apic_retrigger_irq() grabs vector_lock, see code below.
>>
>> I am not sure if this is needed, because the function
>> is called with a lock held on irqdesc, so I think the CPU and
>> vector should be stable.
>>
>> Comments ?
>
> You're right. Any action which would change apcid->vector has to hold
> the descriptor lock.

I did some archaeology. This is a leftover from the v2.6 times where it
was truly required. That never got cleaned up after the whole vector
management got rewritten and the reason for the locking went away in
v4.15. Nobody noticed :)

How did you find that?

Thanks,

tglx