From: Thomas Gleixner <tglx@linutronix.de>
To: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH REPOST 2.6.36-rc2] percpu_counter: add debugobj support
Date: Tue, 24 Aug 2010 15:26:14 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1008241525250.2768@localhost.localdomain> (raw)
In-Reply-To: <4C739B49.6080409@kernel.org>
On Tue, 24 Aug 2010, Tejun Heo wrote:
> All percpu counters are linked to a global list on initialization and
> removed from it on destruction. The list is walked during CPU
> up/down. If a percpu counter is freed without being properly
> destroyed, the system will oops only on the next CPU up/down making it
> pretty nasty to track down. This patch adds debugobj support for
> percpu counters so that such problems can be found easily.
>
> As percpu counters don't make sense on stack and can't be statically
> initialized, debugobj support is pretty simple. It's initialized and
> activated on counter initialization, and deactivatd and destroyed on
> counter destruction. With this patch applied, the bug fixed by commit
> 602586a83b719df0fbd94196a1359ed35aeb2df3 (shmem: put_super must
> percpu_counter_destroy) triggers the following warning on tmpfs
> unmount and the system won't oops on the next cpu up/down operation.
>
> ------------[ cut here ]------------
> WARNING: at /devel/tj/os/work/lib/debugobjects.c:259 debug_print_object+0x5c/0x70()
> Hardware name: Bochs
> ODEBUG: free active (active state 0) object type: percpu_counter
> Modules linked in:
> Pid: 3999, comm: umount Not tainted 2.6.36-rc2-work+ #5
> Call Trace:
> [<ffffffff81083f7f>] warn_slowpath_common+0x7f/0xc0
> [<ffffffff81084076>] warn_slowpath_fmt+0x46/0x50
> [<ffffffff813b45cc>] debug_print_object+0x5c/0x70
> [<ffffffff813b50e5>] debug_check_no_obj_freed+0x125/0x210
> [<ffffffff811577d3>] kfree+0xb3/0x2f0
> [<ffffffff81132edd>] shmem_put_super+0x1d/0x30
> [<ffffffff81162e96>] generic_shutdown_super+0x56/0xe0
> [<ffffffff81162f86>] kill_anon_super+0x16/0x60
> [<ffffffff81162ff7>] kill_litter_super+0x27/0x30
> [<ffffffff81163295>] deactivate_locked_super+0x45/0x60
> [<ffffffff81163cfa>] deactivate_super+0x4a/0x70
> [<ffffffff8117d446>] mntput_no_expire+0x86/0xe0
> [<ffffffff8117df7f>] sys_umount+0x6f/0x360
> [<ffffffff8103f01b>] system_call_fastpath+0x16/0x1b
> ---[ end trace cce2a341ba3611a7 ]---
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Thomas Gleixner <tglxlinutronix.de>
next prev parent reply other threads:[~2010-08-24 13:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 13:47 general protection fault: 0000 [#1] PREEMPT SMP Sergey Senozhatsky
2010-08-24 8:58 ` Tejun Heo
2010-08-24 9:15 ` Sergey Senozhatsky
2010-08-24 10:12 ` percpu_counter: add debugobj support Tejun Heo
2010-08-24 10:13 ` [PATCH REPOST 2.6.36-rc2] " Tejun Heo
2010-08-24 13:26 ` Thomas Gleixner [this message]
2010-08-24 9:08 ` general protection fault: 0000 [#1] PREEMPT SMP Yong Zhang
2010-08-24 9:17 ` Sergey Senozhatsky
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=alpine.LFD.2.00.1008241525250.2768@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sergey.senozhatsky@gmail.com \
--cc=tj@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
all inboxes | Powered by JetHome®