* [patch] rcutorture: mod_timer() takes an absolute time
@ 2010-02-22 13:10 Dan Carpenter
2010-02-22 17:57 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-02-22 13:10 UTC (permalink / raw)
To: kernel-janitors
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?
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 9bb5217..1970f61 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] rcutorture: mod_timer() takes an absolute time
2010-02-22 13:10 [patch] rcutorture: mod_timer() takes an absolute time Dan Carpenter
@ 2010-02-22 17:57 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2010-02-22 17:57 UTC (permalink / raw)
To: kernel-janitors
On Mon, Feb 22, 2010 at 04:10:00PM +0300, Dan Carpenter wrote:
> 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?
Excellent catch, Dan! Applied.
Thanx, Paul
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
> index 9bb5217..1970f61 100644
> --- a/kernel/rcutorture.c
> +++ b/kernel/rcutorture.c
> @@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-22 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-22 13:10 [patch] rcutorture: mod_timer() takes an absolute time Dan Carpenter
2010-02-22 17:57 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).