mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] spinlock_debug: Print kallsyms name for lock
Date: Tue, 24 Apr 2012 14:54:02 -0700	[thread overview]
Message-ID: <20120424145402.4f9be035.akpm@linux-foundation.org> (raw)
In-Reply-To: <4F961B2F.4060203@codeaurora.org>

On Mon, 23 Apr 2012 20:17:03 -0700
Stephen Boyd <sboyd@codeaurora.org> wrote:

> On 04/23/12 14:54, Andrew Morton wrote:
> >
> >> --- a/lib/spinlock_debug.c
> >> +++ b/lib/spinlock_debug.c
> >> @@ -58,7 +58,7 @@ static void spin_dump(raw_spinlock_t *lock, const char *msg)
> >>  	printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
> >>  		msg, raw_smp_processor_id(),
> >>  		current->comm, task_pid_nr(current));
> >> -	printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
> >> +	printk(KERN_EMERG " lock: %ps, .magic: %08x, .owner: %s/%d, "
> >>  			".owner_cpu: %d\n",
> >>  		lock, lock->magic,
> >>  		owner ? owner->comm : "<none>",
> > Maybe.  It will only do useful things for statically-allocated locks
> > which are rare and which we are unlikely to screw up as easily as locks
> > which lie in dynamically allocated memory.
> 
> Agreed. It catches the really stupid stuff and that's about it. I was
> thinking we could get more information about dynamic allocated locks by
> adding some code to slab to find the slab that a pointer is allocated
> in. Does that sound possible?

Well lockdep knows lots of things about the lock, including numerous
stack backtraces which can be used to identify the lock.  Making 
spinlock_debug use lockdep infrastructure seems a good fit.


  reply	other threads:[~2012-04-24 21:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 21:45 [PATCH 1/2] vsprintf: Fix %ps on non symbols when using kallsyms Stephen Boyd
2012-04-23 21:45 ` [PATCH 2/2] spinlock_debug: Print kallsyms name for lock Stephen Boyd
2012-04-23 21:54   ` Andrew Morton
2012-04-24  3:17     ` Stephen Boyd
2012-04-24 21:54       ` Andrew Morton [this message]
2012-05-10 18:53         ` Stephen Boyd
2012-04-23 21:55 ` [PATCH 1/2] vsprintf: Fix %ps on non symbols when using kallsyms Andrew Morton
2012-07-26  1:38   ` Stephen Boyd

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=20120424145402.4f9be035.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®