public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Imran Khan <imran.f.khan@oracle.com>, mingo@redhat.com, bp@alien8.de
Cc: x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [RFC PATCH] x86/apic: Fix BUG due to multiple allocation of legacy vectors.
Date: Thu, 20 May 2021 10:17:39 +0200	[thread overview]
Message-ID: <8735uhddjw.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210519233928.2157496-1-imran.f.khan@oracle.com>

Imran,

On Wed, May 19 2021 at 23:39, Imran Khan wrote:
> During activation of secondary CPUs, lapic_online is
> invoked to initialize vectors. While lapic_online
> installs legacy vectors on all CPUs, it does not set
> the corresponding bits in per CPU bitmap maintained
> under irq_matrix.
> This may result in these legacy vectors getting allocated
> by irq_matrix_alloc and if that happens subsequent invocation
> of apic_update_vector will cause BUG like the one shown below:
>
> [  154.738226] kernel BUG at arch/x86/kernel/apic/vector.c:172!

please trim the backtrace. It's not really relevant for understanding
the problem.

> This patch marks these legacy vectors as assigned in irq_matrix

git grep 'This patch' Documentation/process/

> so that corresponding bits in percpu bitmaps get set and these
> legacy vectors don't get reallocted.

This is just wrong.

True legacy interrupts (PIC delivery) are marked as system vectors. See
lapic_assign_legacy_vector(). That prevents them from being allocated.

> [  154.858092] CPU: 22 PID: 3569 Comm: ifup-eth Not tainted 5.8.0-20200716.x86_64 #1

I have no idea what this 5.8.0-magic-date kernel is.

Have you verified that this problem exists with upstream?

Thanks,

        tglx

  parent reply	other threads:[~2021-05-20  8:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 23:39 [RFC PATCH] x86/apic: Fix BUG due to multiple allocation of legacy vectors Imran Khan
2021-05-20  5:56 ` Greg KH
2021-05-20  6:22   ` imran.f.khan
2021-05-20  8:17 ` Thomas Gleixner [this message]
2021-05-24  3:29   ` imran.f.khan
2021-05-25 14:51     ` Thomas Gleixner
2021-05-27  5:13       ` imran.f.khan
2021-05-29 11:27 ` [tip: x86/urgent] x86/apic: Mark _all_ legacy interrupts when IO/APIC is missing tip-bot2 for Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735uhddjw.ffs@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=imran.f.khan@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox