rcutorture: mod_timer() takes an absolute time
PATCH 1/1 rcutorture: mod_timer() takes an absolute time
Hi Paul,
I was inspired to write a smatch check based on:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h¸57df1acc634b18db1db2a40864af985100266e
I compiled it and modprobed the resulting module... Is this correct, or did you intend for the timer to trigger right away?
kernel/rcutorture.c +1 -1
@@ -798,7 +798,7 @@ rcu_torture_reader(void *arg) do { if (irqreader && cur_ops->irq_capable) { if (!timer_pending(&t)) - mod_timer(&t, 1); + mod_timer(&t, jiffies + 1); } idx = cur_ops->readlock(); completed = cur_ops->completed();
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Dan Carpenter
Hi Paul,
I was inspired to write a smatch check based on:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h¸57df1acc634b18db1db2a40864af985100266eI compiled it and modprobed the resulting module... Is this correct, or did you intend for the timer to trigger right away?
Excellent catch, Dan! Applied.
Thanx, Paul
Quoted 7 lines
Signed-off-by Dan Carpenter <[email protected]>kernel/rcutorture.c +0
-0
kernel/rcutorture.c rcu_torture_reader(void *arg) · line 804
Quoted 8 lines
kernel/rcutorture.c +1
-1@@ -798,7 +798,7 @@ rcu_torture_reader(void *arg) do { if (irqreader && cur_ops->irq_capable) { if (!timer_pending(&t)) - mod_timer(&t, 1); + mod_timer(&t, jiffies + 1); } idx = cur_ops->readlock(); completed = cur_ops->completed();
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html