All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Timur Tabi <timur@codeaurora.org>,
	Christopher Covington <cov@codeaurora.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	ravikanth.nalla@hpe.com, Len Brown <lenb@kernel.org>,
	harish.k@hpe.com, ashwin.reghunandanan@hpe.com,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] acpi, pci, irq: account for early penalty assignment
Date: Wed, 24 Feb 2016 09:41:17 -0500	[thread overview]
Message-ID: <56CDC10D.9050206@codeaurora.org> (raw)
In-Reply-To: <CAJZ5v0j7CwbBw+i1Fc6OCkHO5AZvdLo8yeDhk4asyCFB68ghKg@mail.gmail.com>

On 2/24/2016 8:04 AM, Rafael J. Wysocki wrote:
> Hi,
> 
> On Tue, Feb 16, 2016 at 3:15 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> On 2/15/2016 7:26 PM, Rafael J. Wysocki wrote:
>>> On Mon, Feb 15, 2016 at 5:41 PM, Sinan Kaya <okaya@codeaurora.org> wrote:
>>>> A crash has been observed when assigning penalty on x86 systems.
>>>>
>>>> It looks like this problem happens on x86 platforms with IOAPIC and an SCI
>>>> interrupt override in the ACPI table with interrupt number greater than
>>>> 16. (22 in this example)
>>>>
>>>> The bug has been introduced by "ACPI, PCI, irq: remove interrupt count
>>>> restriction" commit. The code was using kmalloc to resize the interrupt
>>>> list. In this use case, the set penalty call is coming from early phase
>>>> and the heap is not initialized yet.
>>>>
>>>> BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
>>>> IP: [<ffffffff811e8b9d>] kmem_cache_alloc_trace+0xad/0x1c0
>>>> PGD 0
>>>> Oops: 0000 [#1] SMP
>>>> Modules linked in:
>>>> CPU: 0 PID: 0 Comm: swapper Not tainted 4.5.0-rc2Feb-3_RK #1
>>>> Hardware name: HP Superdome2 16s, BIOS Bundle: 007.006.000 SFW: 033.162.000
>>>> 10/30/2015
>>>> [<ffffffff813bc190>] acpi_irq_set_penalty+0x60/0x8e
>>>> [<ffffffff813bc1df>] acpi_irq_add_penalty+0x21/0x26
>>>> [<ffffffff813bc76d>] acpi_penalize_sci_irq+0x25/0x28
>>>> [<ffffffff81b8260d>] acpi_sci_ioapic_setup+0x68/0x78
>>>> [<ffffffff81b830fc>] acpi_boot_init+0x2cc/0x533
>>>> [<ffffffff810677c8>] ? set_pte_vaddr_pud+0x48/0x50
>>>> [<ffffffff81b828cf>] ? acpi_parse_x2apic+0x77/0x77
>>>> [<ffffffff81b82858>] ? dmi_ignore_irq0_timer_override+0x30/0x30
>>>> [<ffffffff81b77c1e>] setup_arch+0xc24/0xce9
>>>> [<ffffffff81b6e120>] ? early_idt_handler_array+0x120/0x120
>>>> [<ffffffff81b6ed94>] start_kernel+0xfc/0x506
>>>> [<ffffffff81b6e120>] ? early_idt_handler_array+0x120/0x120
>>>> [<ffffffff81b6e120>] ? early_idt_handler_array+0x120/0x120
>>>> [<ffffffff81b6e5ee>] x86_64_start_reservations+0x2a/0x2c
>>>> [<ffffffff81b6e73c>] x86_64_start_kernel+0x14c/0x16f
>>>>
>>>> Besides from the use case above, there is one more situation where
>>>> set_penalty is being called from the init context like. There is support
>>>> for setting the penalty through kernel command line.
>>>>
>>>> Adding support to be called from early context for limited number of
>>>> interrupts.
>>>>
>>>> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
>>>
>>> This looks somewhat hackish to me to be honest.
>> I know.
> 
> So after an e-mail exchange with Bjorn I've decided to revert the
> problematic commit for 4.5, so please submit it again with the fix
> folded in (or a better way to address the issue if you have one).
> 

OK, I'll post a new version of the removed patch with this included. We can 
discuss on the list if there is a better way of doing things.

> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

      reply	other threads:[~2016-02-24 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 16:41 [PATCH] acpi, pci, irq: account for early penalty assignment Sinan Kaya
2016-02-16  0:26 ` Rafael J. Wysocki
2016-02-16  2:15   ` Sinan Kaya
2016-02-24 13:04     ` Rafael J. Wysocki
2016-02-24 14:41       ` Sinan Kaya [this message]

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=56CDC10D.9050206@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=ashwin.reghunandanan@hpe.com \
    --cc=bhelgaas@google.com \
    --cc=cov@codeaurora.org \
    --cc=harish.k@hpe.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=ravikanth.nalla@hpe.com \
    --cc=rjw@rjwysocki.net \
    --cc=timur@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.