lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Oct 2007 02:39:16 -0700
From:	Josh Triplett <josh@...edesktop.org>
To:	ego@...ibm.com
CC:	Paul E McKenney <paulmck@...ibm.com>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Oleg Nesterov <oleg@...sign.ru>,
	Dipankar Sarma <dipankar@...ibm.com>, rostedt@...dmis.org
Subject: Re: [PATCH] Use raw_smp_processor_id() in rcu_random()

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]
>  [<c010612f>] dump_trace+0x68/0x1d2
>  [<c01062b1>] show_trace_log_lvl+0x18/0x2c
>  [<c0106c23>] show_trace+0xf/0x11
>  [<c0106d33>] dump_stack+0x12/0x14
>  [<c02a0a25>] debug_smp_processor_id+0xa1/0xb4
>  [<f887064c>] rcu_random+0x16/0x39 [rcutorture]
>  [<f8870cdf>] <3>BUG: using smp_processor_id() in preemptible [00000001] code: rcu_torture_fak/5156
> rcu_torture_fakewriter+0x4d/0xc5 [rcutorture]
>  [<c0139b32>] caller is rcu_random+0x16/0x39 [rcutorture]
> kthread+0x38/0x5e
>  [<c0105ca7>] kernel_thread_helper+0x7/0x10
>  =======================
>  [<c010612f>] dump_trace+0x68/0x1d2
>  [<c01062b1>] show_trace_log_lvl+0x18/0x2c
>  [<c0106c23>] show_trace+0xf/0x11
>  [<c0106d33>] dump_stack+0x12/0x14
>  [<c02a0a25>] debug_smp_processor_id+0xa1/0xb4
>  [<f887064c>] rcu_random+0x16/0x39 [rcutorture]
>  [<f8870cdf>] 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 <ego@...ibm.com>

Looks reasonable to me.

Acked-by: Josh Triplett <josh@...nel.org> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ