forked from luck/tmp_suning_uos_patched
rcutorture: Add missing destroy_timer_on_stack()
The rcu_torture_reader() function uses an on-stack timer_list structure which it initializes with setup_timer_on_stack(). However, it fails to use destroy_timer_on_stack() before exiting, which results in leaking a tracking object if DEBUG_OBJECTS is enabled. This commit therefore invokes destroy_timer_on_stack() to avoid this leakage. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
f0bf8fab4f
commit
424c1b6820
|
@ -1023,8 +1023,10 @@ rcu_torture_reader(void *arg)
|
|||
cond_resched();
|
||||
stutter_wait("rcu_torture_reader");
|
||||
} while (!torture_must_stop());
|
||||
if (irqreader && cur_ops->irq_capable)
|
||||
if (irqreader && cur_ops->irq_capable) {
|
||||
del_timer_sync(&t);
|
||||
destroy_timer_on_stack(&t);
|
||||
}
|
||||
torture_kthread_stopping("rcu_torture_reader");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user