Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755423Ab0DWC64 (ORCPT ); Thu, 22 Apr 2010 22:58:56 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:59861 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755271Ab0DWC6y (ORCPT ); Thu, 22 Apr 2010 22:58:54 -0400 Message-ID: <4BD10D59.9090504@cn.fujitsu.com> Date: Fri, 23 Apr 2010 11:00:41 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: KAMEZAWA Hiroyuki , Balbir Singh , Daisuke Nishimura , "Paul E. McKenney" CC: "linux-mm@kvack.org" , LKML Subject: [BUG] an RCU warning in memcg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1892 Lines: 49 with CONFIG_PROVE_RCU=y, I saw this warning, it's because css_id() is not under rcu_read_lock(). =================================================== [ 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: [] swap_info_get+0x4b/0xd0 stack backtrace: Pid: 31, comm: kswapd0 Not tainted 2.6.34-rc5-tip+ #13 Call Trace: [] ? printk+0x1d/0x1f [] lockdep_rcu_dereference+0x94/0xb0 [] css_id+0x5d/0x60 [] mem_cgroup_uncharge_swapcache+0x45/0xa0 [] swapcache_free+0x3f/0x60 [] __remove_mapping+0xb2/0xf0 [] shrink_page_list+0x26b/0x490 [] ? put_lock_stats+0xd/0x30 [] ? _raw_spin_unlock_irq+0x27/0x50 [] ? trace_hardirqs_on_caller+0xb6/0x220 [] shrink_inactive_list+0x278/0x620 [] ? sched_clock_cpu+0x121/0x180 [] ? trace_hardirqs_off_caller+0x18/0x130 [] ? trace_hardirqs_off+0xb/0x10 [] ? sub_preempt_count+0x8/0x90 [] ? put_lock_stats+0xd/0x30 [] shrink_zone+0x204/0x3c0 [] ? _raw_spin_unlock+0x2c/0x50 [] kswapd+0x61e/0x7c0 [] ? isolate_pages_global+0x0/0x1f0 [] ? autoremove_wake_function+0x0/0x50 [] ? kswapd+0x0/0x7c0 [] kthread+0x74/0x80 [] ? kthread+0x0/0x80 [] kernel_thread_helper+0x6/0x10 -- 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/