public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* rcu: Call mod_timer() correctly in wake_nocb_leader_defer()
@ 2017-05-17 19:44 Dan Carpenter
  2017-05-17 20:21 ` Paul E. McKenney
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-05-17 19:44 UTC (permalink / raw)
  To: kernel-janitors

Smatch complains that:

	kernel/rcu/tree_plugin.h:1838 wake_nocb_leader_defer()
	warn: mod_timer() takes an absolute time not an offset.

which is true.

Fixes: ebf7068a4396 ("rcu: Use timer as backstop for NOCB deferred wakeups")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 34dbd0aad732..74492f20c252 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1835,7 +1835,7 @@ static void wake_nocb_leader_defer(struct rcu_data *rdp, int waketype,
 	trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, reason);
 	raw_spin_unlock_irqrestore(&rdp->nocb_lock, flags);
 	if (needtimer)
-		mod_timer(&rdp->nocb_timer, 1);
+		mod_timer(&rdp->nocb_timer, jiffies + 1);
 }
 
 /*

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-17 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-17 19:44 rcu: Call mod_timer() correctly in wake_nocb_leader_defer() Dan Carpenter
2017-05-17 20:21 ` Paul E. McKenney
2017-05-17 20:37 ` Dan Carpenter
2017-05-17 21:15 ` 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