Commit 9f93c0e8 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Gerrit - the friendly Code Review server
Browse files

sched: walt: fix use after free in walt_task_dump()



When SCHED_BUG_ON() is hit, we are printing the current tasks of
all online CPUs. Accessing the task on the remote CPU is racy. It
can be made safe by incrementing the task struct reference and also
adding a check against the exiting flag. The WALT CPU load pointers
are freed only after setting the exiting flag. This exiting flag
check helps is not accessing the freed memory.

Change-Id: I2fcbd37e9e4f096da5372be041aec2b60da26341
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent f48c2cc3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment