[patch] rcutorture: mod_timer() takes an absolute time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=b857df1acc634b18db1db2a40864af985100266e

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@xxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux