tracing/workqueues: Add refcnt to struct cpu_workqueue_stats
The stat entries can be freed when the stat file is being read. The worse is, the ptr can be freed immediately after it's returned from workqueue_stat_start/next(). Add a refcnt to struct cpu_workqueue_stats to avoid use-after-free. Signed-off-by:Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by:
Li Zefan <lizf@cn.fujitsu.com> Acked-by:
Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4A51B16F.6010608@cn.fujitsu.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
Loading
Please register or sign in to comment