login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
23
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was Re: [BUG] an RCU warning in memcg
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Balbir Singh
Subject:
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was Re: [BUG] an RCU warning in memcg
Date: Thursday, April 22, 2010 - 8:32 pm
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-04-23 12:14:24]:
quoted text
> On Fri, 23 Apr 2010 11:00:41 +0800 > Li Zefan <lizf@cn.fujitsu.com> wrote: > > > with CONFIG_PROVE_RCU=y, I saw this warning, it's because > > css_id() is not under rcu_read_lock(). > > > > Ok. Thank you for reporting. > This is ok ? > == > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > css_id() should be called under rcu_read_lock(). > Following is a report from Li Zefan. > == > =================================================== > [ INFO: suspicious rcu_dereference_check() usage. ] > --------------------------------------------------- > kernel/cgroup.c:4438 invoked rcu_dereference_check() without protection! > > other info that might help us debug this: > > > rcu_scheduler_active = 1, debug_locks = 1 > 1 lock held by kswapd0/31: > #0: (swap_lock){+.+.-.}, at: [<c05058bb>] swap_info_get+0x4b/0xd0 > > stack backtrace: > Pid: 31, comm: kswapd0 Not tainted 2.6.34-rc5-tip+ #13 > Call Trace: > [<c083c5d6>] ? printk+0x1d/0x1f > [<c0480744>] lockdep_rcu_dereference+0x94/0xb0 > [<c049d6ed>] css_id+0x5d/0x60 > [<c05165a5>] mem_cgroup_uncharge_swapcache+0x45/0xa0 > [<c0505e4f>] swapcache_free+0x3f/0x60 > [<c04e79e2>] __remove_mapping+0xb2/0xf0 > [<c04e7cbb>] shrink_page_list+0x26b/0x490 > [<c047f85d>] ? put_lock_stats+0xd/0x30 > [<c083fd67>] ? _raw_spin_unlock_irq+0x27/0x50 > [<c0482566>] ? trace_hardirqs_on_caller+0xb6/0x220 > [<c04e8158>] shrink_inactive_list+0x278/0x620 > [<c04729e1>] ? sched_clock_cpu+0x121/0x180 > [<c047e9b8>] ? trace_hardirqs_off_caller+0x18/0x130 > [<c047eadb>] ? trace_hardirqs_off+0xb/0x10 > [<c0843438>] ? sub_preempt_count+0x8/0x90 > [<c047f85d>] ? put_lock_stats+0xd/0x30 > [<c04e8704>] shrink_zone+0x204/0x3c0 > [<c083fcac>] ? _raw_spin_unlock+0x2c/0x50 > [<c04e951e>] kswapd+0x61e/0x7c0 > [<c04e6ed0>] ? isolate_pages_global+0x0/0x1f0 > [<c046bae0>] ? autoremove_wake_function+0x0/0x50 > [<c04e8f00>] ? kswapd+0x0/0x7c0 > [<c046b5e4>] kthread+0x74/0x80 > [<c046b570>] ? kthread+0x0/0x80 > [<c04035ba>] kernel_thread_helper+0x6/0x10 > > Reported-by: Li Zefan <lizf@cn.fujitsu.com> > Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> > Cc: Balbir Singh <balbir@linux.vnet.ibm.com> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > --- > mm/memcontrol.c | 2 ++ > 1 file changed, 2 insertions(+) > > Index: linux-2.6.34-rc5-mm1/mm/memcontrol.c > =================================================================== > --- linux-2.6.34-rc5-mm1.orig/mm/memcontrol.c > +++ linux-2.6.34-rc5-mm1/mm/memcontrol.c > @@ -2401,7 +2401,9 @@ mem_cgroup_uncharge_swapcache(struct pag > > /* record memcg information */ > if (do_swap_account && swapout && memcg) { > + rcu_read_lock(); > swap_cgroup_record(ent, css_id(&memcg->css)); > + rcu_read_unlock(); > mem_cgroup_get(memcg);
Excellent Catch! Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com> -- Three Cheers, Balbir --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[BUG] an RCU warning in memcg
, Li Zefan
, (Thu Apr 22, 8:00 pm)
[BUGFIX][PATCH] memcg rcu lock fix in swap code (Was Re: [ ...
, KAMEZAWA Hiroyuki
, (Thu Apr 22, 8:14 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was R ...
, Balbir Singh
, (Thu Apr 22, 8:32 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was R ...
, Li Zefan
, (Thu Apr 22, 8:49 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was R ...
, KAMEZAWA Hiroyuki
, (Thu Apr 22, 8:50 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was R ...
, Li Zefan
, (Thu Apr 22, 8:55 pm)
[BUGFIX][PATCH] memcg rcu lock fix v2
, KAMEZAWA Hiroyuki
, (Thu Apr 22, 8:58 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix in swap code (Was R ...
, Li Zefan
, (Thu Apr 22, 9:02 pm)
[BUGFIX][PATCH] memcg rcu lock fix v3
, KAMEZAWA Hiroyuki
, (Thu Apr 22, 9:03 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, Daisuke Nishimura
, (Thu Apr 22, 9:41 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, KAMEZAWA Hiroyuki
, (Thu Apr 22, 11:05 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, Li Zefan
, (Thu Apr 22, 11:10 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, KAMEZAWA Hiroyuki
, (Thu Apr 22, 11:57 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, Balbir Singh
, (Fri Apr 23, 12:00 am)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, Paul E. McKenney
, (Fri Apr 23, 12:34 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, KAMEZAWA Hiroyuki
, (Fri Apr 23, 7:08 pm)
Re: [BUGFIX][PATCH] memcg rcu lock fix v3
, Paul E. McKenney
, (Fri Apr 23, 9:27 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Christoph Lameter
[PATCH 1/2] Make page->private usable in compound pages V1
Luben Tuikov
Re: Integration of SCST in the mainstream Linux kernel
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Michal Nazarewicz
Re: [PATCH] USB: Gadget: g_multi: added INF file for gadget with multiple configur...
Jesse Barnes
Re: PCI probing changes
git
:
Jakub Narebski
Re: GSoC 2008 - Mentors Wanted!
Jan Harkes
Re: git-svn and huge data and modifying the git-svn-HEAD branch directly
Andy Parkins
git-fetch fails with error code 128
Marcus Griep
Re: [PATCH 1/3] Git.pm: Add faculties to allow temp files to be cached
Junio C Hamano
Re: [JGIT PATCH 2/2] Decrease the fetch pack client buffer to the lower minimum
git-commits-head
:
Linux Kernel Mailing List
ARM: 5970/1: nomadik-gpio: fix spinlock usage
Linux Kernel Mailing List
sh-sci: update receive error handling for muxed irqs
Linux Kernel Mailing List
No need to do lock_super() for exclusion in generic_shutdown_super()
Linux Kernel Mailing List
x86, msr: Export the register-setting MSR functions via /dev/*/msr
Linux Kernel Mailing List
Input: gpio-keys - add support for disabling gpios through sysfs
linux-netdev
:
Eric Dumazet
[PATCH] net: ALIGN/PTR_ALIGN cleanup in alloc_netdev_mq()/netdev_priv()
Patrick McHardy
[NET_SCHED]: sch_ingress: remove netfilter support
Rose, Gregory V
RE: __bad_udelay in network driver breaks build
Patrick McHardy
Re: no reassembly for outgoing packets on RAW socket
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
openbsd-misc
:
ropers
Re: Real men don't attack straw men
elitdostlar
Seks partneri arayan bayanlar bu adreste - 8878xs706x6438
Marcus Andree
Re: This is what Linus Torvalds calls openBSD crowd
Lars D. Noodén
Re: sshd.config and AllowUsers
Henning Brauer
Re: Sun Blade 1000?
Colocation donated by:
Syndicate