From: Dave Jones <davej@redhat.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Greg KH <gregkh@linuxfoundation.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kobject: delayed kobject release: help find buggy drivers
Date: Thu, 5 Sep 2013 21:11:37 -0400 [thread overview]
Message-ID: <20130906011137.GA25277@redhat.com> (raw)
In-Reply-To: <20130905214434.GL6617@n2100.arm.linux.org.uk>
On Thu, Sep 05, 2013 at 10:44:34PM +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 05, 2013 at 05:26:06PM -0400, Dave Jones wrote:
> > On Thu, Sep 05, 2013 at 05:11:13PM -0400, Dave Jones wrote:
> > > > Trying without serial console next..
> > >
> > > rebuilt with all serial turned off.
> > >
> > > no luck, then it oopses somewhere else. I'm suspecting something isn't
> > > right with that debug patch, as the next trace is also in kobject_release
>
> You're right about that - I had assumed that it was necessary for all
> kobjects to be 'added' before they're released, but that is not so.
> Mea culpa. They just need to be initialised - the problem with putting
> a kmalloc into kobject_init() is that if it fails, we have no way to
> report that failure...
>
> Updated patch attached... though it sounds like you got it working
> anyway.
>
> > I managed to get to userspace on one boot, and got this.
> >
> > kobject ffff88023d93f518 has been corrupted (magic 0x6b6b6b6b). Please
> > enable kobject debugging for full debug.
>
> Okay, so this is definitely a case that someone has kfree'd the kobject
> without waiting for the ->release function to be called.
>
> > That looks like SLAB_POISON. Incompatibility between the two options ?
> >
> > For some reason, even though I have DEBUG_KOBJECT on, I didn't get
> > extra messages output.
>
> Hmm.
>
> ifeq ($(CONFIG_DEBUG_KOBJECT),y)
> CFLAGS_kobject.o += -DDEBUG
> CFLAGS_kobject_uevent.o += -DDEBUG
> endif
>
> should enable the pr_debug()'s in lib/kobject.c... which should at least
> appear in the dmesg log. Being debug level, of course, they won't appear
> during normal kernel boot unless 'debug' is passed on the kernel command
> line.
>
> It seems to work for me - but... produces rather a lot of debug messages,
> so you may also wish to ensure that you have LOG_BUF_SHIFT set to
> something large.
As discussed on irc, with this updated patch it hangs *really* early in boot.
With earlyprintk=vga I can see some of the trace..
kobject_init
firmware_map_add_entry
firmware_map_add_early
e820_reserve_resources
setup_arch
start_kernel
x86_64_start_reservations
x86_64_start_kernel
<RIP> kmem_cache_alloc_trace
Dave
next prev parent reply other threads:[~2013-09-06 1:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130903185924.046EE660E91@gitolite.kernel.org>
2013-09-03 20:44 ` kobject: delayed kobject release: help find buggy drivers Dave Jones
2013-09-03 20:55 ` Greg KH
2013-09-04 5:23 ` Rusty Russell
2013-09-05 4:13 ` Dave Jones
2013-09-05 4:57 ` Greg KH
2013-09-05 5:00 ` Dave Jones
2013-09-05 5:19 ` Dave Jones
2013-09-05 15:34 ` Greg KH
2013-09-05 15:47 ` Dave Jones
2013-09-05 17:35 ` Russell King - ARM Linux
2013-09-05 18:13 ` Dave Jones
2013-09-05 19:29 ` Dave Jones
2013-09-05 21:11 ` Dave Jones
2013-09-05 21:26 ` Dave Jones
2013-09-05 21:44 ` Russell King - ARM Linux
2013-09-06 1:11 ` Dave Jones [this message]
2013-09-06 7:59 ` Russell King - ARM Linux
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=20130906011137.GA25277@redhat.com \
--to=davej@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=rusty@rustcorp.com.au \
/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