lkml.org 
[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 31/41] rcu: Add CPU-stall capability to rcutorture


On Wed, 1 Feb 2012, Josh Triplett wrote:

> On Wed, Feb 01, 2012 at 11:41:49AM -0800, Paul E. McKenney wrote:
>> --- a/kernel/rcutorture.c
>> +++ b/kernel/rcutorture.c
>> +/* Spawn CPU-stall kthread, if stall_cpu specified. */
>> +static int __init rcu_torture_stall_init(void)
>> +{
>> + if (stall_cpu <= 0)
>> + return 0;
>> + stall_task = kthread_run(rcu_torture_stall, NULL, "rcu_torture_stall");
>> + if (IS_ERR(stall_task)) {
>> + stall_task = NULL;
>> + return PTR_ERR(stall_task);
>
> This seems...unlikely to produce the desired result. :)
>
> A quick check turns up the same bug in rcutorture_onoff_init.
>
> This suggests a possible Coccinelle check, for uses of PTR_ERR(foo) after
> foo = (any constant other than ERR_PTR(foo)).

Indeed, it seems to be a popular idiom :) I'll send some patches later
today.

julia


\
 
 \ /
  Last update: 2012-02-02 10:17    [W:0.313 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site