sched: change WARN_ON_ONCE to printk_deferred() in try_to_wake_up_local()
try_to_wake_up_local() is called with the rq lock held. Printing to console in this context can result in a deadlock if klogd needs to be woken up. Print to the kernel log buffer via printk_sched() instead which avoids the wakeup. Change-Id: Ia07baea3cb7e0b158545207fdbbb866203256d3c Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
This commit is contained in:
parent
9f6eb26ae8
commit
387dcd0663
1 changed files with 6 additions and 2 deletions
|
@ -2048,9 +2048,13 @@ static void try_to_wake_up_local(struct task_struct *p)
|
|||
{
|
||||
struct rq *rq = task_rq(p);
|
||||
|
||||
if (WARN_ON_ONCE(rq != this_rq()) ||
|
||||
WARN_ON_ONCE(p == current))
|
||||
if (rq != this_rq() || p == current) {
|
||||
printk_deferred("%s: Failed to wakeup task %d (%s), rq = %p,"
|
||||
" this_rq = %p, p = %p, current = %p\n",
|
||||
__func__, task_pid_nr(p), p->comm, rq,
|
||||
this_rq(), p, current);
|
||||
return;
|
||||
}
|
||||
|
||||
lockdep_assert_held(&rq->lock);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue