Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760868AbXJLJj3 (ORCPT ); Fri, 12 Oct 2007 05:39:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757324AbXJLJjV (ORCPT ); Fri, 12 Oct 2007 05:39:21 -0400 Received: from mail1.sea5.speakeasy.net ([69.17.117.3]:51889 "EHLO mail1.sea5.speakeasy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755549AbXJLJjV (ORCPT ); Fri, 12 Oct 2007 05:39:21 -0400 Message-ID: <470F40C4.1050901@freedesktop.org> Date: Fri, 12 Oct 2007 02:39:16 -0700 From: Josh Triplett User-Agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071009) MIME-Version: 1.0 To: ego@in.ibm.com CC: Paul E McKenney , linux-kernel@vger.kernel.org, Andrew Morton , Oleg Nesterov , Dipankar Sarma , rostedt@goodmis.org Subject: Re: [PATCH] Use raw_smp_processor_id() in rcu_random() References: <20071012092044.GA1138@in.ibm.com> In-Reply-To: <20071012092044.GA1138@in.ibm.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1667 Lines: 41 Gautham R Shenoy wrote: > With CONFIG_PREEMPT=y on 2.6.23-rc8-mm2, rcu_random() calls > smp_processor_id() from a preemptible context, triggering the > following kernel error. > > BUG: using smp_processor_id() in preemptible [00000001] code: rcu_torture_fak/5155 > caller is rcu_random+0x16/0x39 [rcutorture] > [] dump_trace+0x68/0x1d2 > [] show_trace_log_lvl+0x18/0x2c > [] show_trace+0xf/0x11 > [] dump_stack+0x12/0x14 > [] debug_smp_processor_id+0xa1/0xb4 > [] rcu_random+0x16/0x39 [rcutorture] > [] <3>BUG: using smp_processor_id() in preemptible [00000001] code: rcu_torture_fak/5156 > rcu_torture_fakewriter+0x4d/0xc5 [rcutorture] > [] caller is rcu_random+0x16/0x39 [rcutorture] > kthread+0x38/0x5e > [] kernel_thread_helper+0x7/0x10 > ======================= > [] dump_trace+0x68/0x1d2 > [] show_trace_log_lvl+0x18/0x2c > [] show_trace+0xf/0x11 > [] dump_stack+0x12/0x14 > [] debug_smp_processor_id+0xa1/0xb4 > [] rcu_random+0x16/0x39 [rcutorture] > [] rcu_torture_fakewriter+0x4d/0xc5 [rcutorture] > > rcu_random() can do with raw_smp_processor_id() as a parameter to cpu_clock() > in this particular context. > > Signed-off-by: Gautham R Shenoy Looks reasonable to me. Acked-by: Josh Triplett - 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/