rcu: Fix self-wakeups for grace-period kthread
The current rcu_gp_kthread_wake() function uses in_interrupt() and thus does a self-wakeup from all interrupt contexts, including the pointless case where the GP kthread happens to be running with bottom halves disabled, along with the impossible case where the GP kthread is running within an NMI handler (you are not supposed to invoke rcu_gp_kthread_wake() from within an NMI handler. This commit therefore replaces the in_interrupt() with in_irq(), so that the self-wakeups happen only from handlers for hardware interrupts and softirqs. This also makes the code match the comment. Change-Id: Icdc3a9a03d6a58d59cf4e81911ad7b48651c82f0 Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: mydongistiny <jaysonedson@gmail.com> Signed-off-by: CloudedQuartz <ravenklawasd@gmail.com> Signed-off-by: Sorayukii <sorayukii69@gmail.com>
This commit is contained in:
parent
75c0bd3491
commit
402380680a
1 changed files with 1 additions and 1 deletions
|
|
@ -1774,7 +1774,7 @@ static int rcu_future_gp_cleanup(struct rcu_state *rsp, struct rcu_node *rnp)
|
|||
static void rcu_gp_kthread_wake(struct rcu_state *rsp)
|
||||
{
|
||||
if ((current == rsp->gp_kthread &&
|
||||
!in_interrupt() && !in_serving_softirq()) ||
|
||||
!in_irq() && !in_serving_softirq()) ||
|
||||
!READ_ONCE(rsp->gp_flags) ||
|
||||
!rsp->gp_kthread)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue