Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039Ab0KYGxm (ORCPT ); Thu, 25 Nov 2010 01:53:42 -0500 Received: from mail-gx0-f174.google.com ([209.85.161.174]:44666 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752006Ab0KYGxi convert rfc822-to-8bit (ORCPT ); Thu, 25 Nov 2010 01:53:38 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=q0jQZ9Jiddwalusz5W7im8m7a/ArGaz75ErT3ErGcW/6wm+wcCJdQ2gY5lDTzE/fKH t1gwYE+M2eqHzjXiR0YpHPAhVdMxePGGY/D9xyzdWgkVHfb8PM0DET7OY6bMmKUrvtps m4epNJuVTwNk8B1dKnjYh2ORdf2/z1MkfSCl4= MIME-Version: 1.0 In-Reply-To: <6340.1290665937@localhost> References: <6340.1290665937@localhost> Date: Thu, 25 Nov 2010 14:53:37 +0800 Message-ID: Subject: Re: 2.6.37-rc3-mmotm1123 - arch/x86/kernel/cpu/mcheck/mce.c:1628 invoked rcu_dereference_check() without protection! From: huang ying To: Valdis.Kletnieks@vt.edu Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-kernel@vger.kernel.org, x86@kernel.org, Andi Kleen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3611 Lines: 66 On Thu, Nov 25, 2010 at 2:18 PM, wrote: > (Appears to have been present in -rc2-mmotm1117 as well, and maybe earlier. I > suspect mcelog wasn't getting run at boot due to my fighting with systemd, so I > didn't see it). > > [  146.195836] =================================================== > [  146.195839] [ INFO: suspicious rcu_dereference_check() usage. ] > [  146.195841] --------------------------------------------------- > [  146.195844] arch/x86/kernel/cpu/mcheck/mce.c:1628 invoked rcu_dereference_check() without protection! The warning comes from the rcu_dereference_check_mce() in mce_poll(). It seems that we do not need rcu_dereference_check_mce() here. Because we only check the value of mcelog.next, but do not use that value to access the content of the array. Best Regards, Huang Ying > [  146.195847] > [  146.195847] other info that might help us debug this: > [  146.195848] > [  146.195850] > [  146.195850] rcu_scheduler_active = 1, debug_locks = 1 > [  146.195853] no locks held by mcelog/3806. > [  146.195855] > [  146.195855] stack backtrace: > [  146.195858] Pid: 3806, comm: mcelog Tainted: G        W   2.6.37-rc3-mmotm1123 #4 > [  146.195860] Call Trace: > [  146.195869]  [] lockdep_rcu_dereference+0x9d/0xa5 > [  146.195875]  [] mce_poll+0x66/0x74 > [  146.195880]  [] do_sys_poll+0x23b/0x3a5 > [  146.195885]  [] ? __pollwait+0x0/0xc7 > [  146.195889]  [] ? pollwake+0x0/0x4f > [  146.195893]  [] ? pollwake+0x0/0x4f > [  146.195898]  [] ? __rcu_read_unlock+0x28f/0x2ab > [  146.195903]  [] ? __do_fault+0x256/0x3e5 > [  146.195908]  [] ? look_up_lock_class+0x5f/0xc4 > [  146.195912]  [] ? __do_fault+0x256/0x3e5 > [  146.195916]  [] ? register_lock_class+0x1e/0x2d3 > [  146.195921]  [] ? trace_preempt_on+0x15/0x28 > [  146.195925]  [] ? __do_fault+0x34c/0x3e5 > [  146.195931]  [] ? _raw_spin_unlock+0x30/0x69 > [  146.195935]  [] ? mark_lock+0x2d/0x1d8 > [  146.195940]  [] ? unlock_page+0x25/0x2a > [  146.195944]  [] ? __lock_acquire+0x54e/0xd4e > [  146.195948]  [] ? handle_mm_fault+0x193/0x7c3 > [  146.195953]  [] ? sigprocmask+0x2f/0xc5 > [  146.195957]  [] ? sigprocmask+0x2f/0xc5 > [  146.195962]  [] ? might_fault+0x4e/0x9e > [  146.195966]  [] ? _raw_spin_unlock_irq+0x2b/0x70 > [  146.195970]  [] ? trace_preempt_on+0x15/0x28 > [  146.195974]  [] ? sigprocmask+0xba/0xc5 > [  146.195978]  [] ? _raw_spin_unlock_irq+0x36/0x70 > [  146.195983]  [] ? sub_preempt_count+0x35/0x49 > [  146.195987]  [] ? _raw_spin_unlock_irq+0x62/0x70 > [  146.195992]  [] sys_ppoll+0xd3/0x13c > [  146.195996]  [] ? trace_hardirqs_on_caller+0x117/0x13b > [  146.196087]  [] ? trace_hardirqs_on_thunk+0x3a/0x3f > [  146.196094]  [] system_call_fastpath+0x16/0x1b > > -- 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/