From: Veaceslav Falico <vfalico@redhat.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Yinghai Lu" <yinghai@kernel.org>,
"Knut Petersen" <Knut_Petersen@t-online.de>,
"Ingo Molnar" <mingo@kernel.org>,
"Paul McKenney" <paulmck@linux.vnet.ibm.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [BUG 3.12.rc4] Oops: unable to handle kernel paging request during shutdown
Date: Mon, 28 Oct 2013 18:39:49 +0100 [thread overview]
Message-ID: <20131028173949.GG11209@redhat.com> (raw)
In-Reply-To: <CAErSpo4YgTgapdUcMwMWZzQqDHn8AcGu-OPQfWbP4svUerr0Ow@mail.gmail.com>
On Mon, Oct 28, 2013 at 11:35:09AM -0600, Bjorn Helgaas wrote:
>On Mon, Oct 28, 2013 at 11:30 AM, Veaceslav Falico <vfalico@redhat.com> wrote:
>> On Mon, Oct 28, 2013 at 11:23:41AM -0600, Bjorn Helgaas wrote:
>>>
>>> [+cc Veaceslav]
>>>
>>> On Sun, Oct 27, 2013 at 3:24 PM, Greg Kroah-Hartman
>>> <gregkh@linuxfoundation.org> wrote:
>>>>
>>>> On Sun, Oct 27, 2013 at 09:13:29PM +0000, Linus Torvalds wrote:
>>>>>
>>>>> .. and one more case of freeing a delayed work object (likely a kobject
>>>>> again):
>>>>>
>>>>> This time it looks like it's in the PCI layer, freeing the msi irq
>>>>> information.
>>>>>
>>>>> It looks like that code simply does
>>>>>
>>>>> kobject_del(&entry->kobj);
>>>>> kobject_put(&entry->kobj);
>>>>> list_del(&entry->list);
>>>>> kfree(entry);
>>>>>
>>>>> and the problem is that the "entry->kobj" may have *other* references
>>>>> to it, thanks to people accessing it through /sys, so despite doing a
>>>>> kojbect_del/kobject_put(), it's not at all ok to then do a "kfree()"
>>>>> on it. The embedded kobj might still be in use.
>>>>>
>>>>> Afaik, that code should do the kfree() on the kobject in the _release_
>>>>> method, not synchronously like that.
>>>>>
>>>>> We already have a msi_kobj_release(), I'm wondering why that doesn't
>>>>> do the kfree().
>>>>>
>>>>> Bjorn? Yinghai? Greg, comments about that msi kobj usage?
>>>>
>>>>
>>>> Ick, it really should be doing a kfree() in the release only. Bjorn has
>>>> had a bunch of changes in this area recently, perhaps they are in
>>>> linux-next waiting for 3.13, and I've talked to him about getting rid of
>>>> all of the kobjects for msi files, as I don't think it's needed at all.
>>>
>>>
>>> IIRC, you said you might take a look at converting this to attributes
>>> on the train back home, so I haven't looked into it myself :)
>>>
>>>> Bjorn, don't you have a fix for this problem already done somewhere?
>>>
>>>
>>> Yep, this is clearly wrong, and Veaceslav has a patch that moves the
>>> kfree() to the release function. I've been waiting for a consolidated
>>> repost of all his MSI-related fixes, but maybe he's been waiting for
>>> *me*.
>>
>>
>> https://lkml.org/lkml/2013/10/9/170
>>
>> My patchset is ready to be applied, in its v2 state.
>>
>> Except that the bits with kobject_del() (theoretical race) - which are done
>> in your patch "kobject: remove kset from sysfs immediately in
>> kset_unregister()", though I didn't see it accepted.
>>
>> Should I re-send the patchset?
>
>Can you please repost it? That will be easier for me than digging
>individual messages out of the archives. Thanks, and sorry for my
>confusion.
Will rebase and repost, sorry for all the noise about it :).
Thank you!
>
>Bjorn
next prev parent reply other threads:[~2013-10-28 17:42 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <525BD08C.2080101@t-online.de>
2013-10-14 17:53 ` [BUG 3.12.rc4] Oops: unable to handle kernel paging request during shutdown Linus Torvalds
2013-10-14 21:28 ` Paul E. McKenney
2013-10-14 21:51 ` Frederic Weisbecker
2013-10-14 22:31 ` Knut Petersen
2013-10-14 22:43 ` Frederic Weisbecker
2013-10-15 6:40 ` Ingo Molnar
2013-10-15 7:53 ` Knut Petersen
2013-10-17 14:25 ` Frederic Weisbecker
2013-10-18 6:30 ` Ingo Molnar
2013-10-14 21:52 ` Knut Petersen
2013-10-14 23:16 ` Paul E. McKenney
2013-10-15 0:59 ` Paul E. McKenney
2013-10-15 8:06 ` Knut Petersen
2013-10-25 8:38 ` Linus Torvalds
2013-10-25 9:02 ` Linus Torvalds
2013-10-25 9:08 ` Paul E. McKenney
2013-10-25 9:17 ` Greg Kroah-Hartman
2013-10-25 9:13 ` Greg Kroah-Hartman
2013-10-25 9:28 ` Rafael J. Wysocki
2013-10-25 9:51 ` Rafael J. Wysocki
2013-10-25 9:54 ` Viresh Kumar
2013-10-25 10:10 ` Rafael J. Wysocki
2013-10-25 10:00 ` Viresh Kumar
2013-10-25 10:07 ` Linus Torvalds
2013-10-25 11:10 ` Rafael J. Wysocki
2013-10-25 13:49 ` Viresh Kumar
2013-10-25 14:21 ` Rafael J. Wysocki
2013-10-28 15:02 ` Knut Petersen
2013-10-25 10:23 ` Thomas Gleixner
2013-10-25 10:48 ` Linus Torvalds
2013-10-26 11:43 ` Ingo Molnar
2013-10-28 14:50 ` Knut Petersen
2013-10-28 15:01 ` Ingo Molnar
2013-10-28 15:16 ` Ingo Molnar
2013-10-28 15:45 ` Knut Petersen
2013-10-27 20:20 ` Linus Torvalds
2013-10-27 20:39 ` Linus Torvalds
2013-10-27 21:13 ` Linus Torvalds
2013-10-27 21:24 ` Greg Kroah-Hartman
2013-10-28 17:23 ` Bjorn Helgaas
2013-10-28 17:30 ` Veaceslav Falico
2013-10-28 17:35 ` Bjorn Helgaas
2013-10-28 17:39 ` Veaceslav Falico [this message]
2013-10-28 18:52 ` Greg Kroah-Hartman
2013-10-30 18:04 ` Pablo Neira Ayuso
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=20131028173949.GG11209@redhat.com \
--to=vfalico@redhat.com \
--cc=Knut_Petersen@t-online.de \
--cc=bhelgaas@google.com \
--cc=fweisbec@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).