Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 580788d5 authored by Satya Durga Srinivasu Prabhala's avatar Satya Durga Srinivasu Prabhala
Browse files

sched: fix suspicious RCU usage warning



Below warning is observed during boot when lockdep is enabled:

[    0.233539] =============================
[    0.237668] WARNING: suspicious RCU usage
[    0.241798] 5.4.57-qgki-debug-g003be53-dirty #2 Not tainted
[    0.247528] -----------------------------
[    0.251657] include/linux/cgroup.h:488 suspicious rcu_dereference_check() usage!
[    0.259250]
[    0.259250] other info that might help us debug this:
[    0.259250]
[    0.267467]
[    0.267467] rcu_scheduler_active = 1, debug_locks = 1
[    0.274179] 2 locks held by swapper/0/0:
[    0.278222]  #0: ffffff800b7b89b0 (&p->pi_lock){....}, at: wake_up_new_task+0x44/0x1f4
[    0.286367]  #1: ffffff8179306018 (&rq->lock){-.-.}, at: __task_rq_lock+0x60/0xd8
[    0.294061]
[    0.294061] stack backtrace:
[    0.298544] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.57-qgki-debug-g003be53-dirty #2
[    0.306946] Hardware name: Qualcomm Technologies, Inc. LahainaP MTP (DT)
[    0.313828] Call trace:
[    0.316353]  dump_backtrace.cfi_jt+0x0/0x4
[    0.320569]  show_stack+0x18/0x24
[    0.323989]  dump_stack+0xe0/0x160
[    0.327496]  lockdep_rcu_suspicious+0x138/0x154
[    0.332155]  task_fits_max+0x11c/0x290
[    0.336015]  enqueue_task_fair+0x104/0x268
[    0.340230]  enqueue_task+0x154/0x1c8
[    0.344003]  wake_up_new_task+0xd4/0x1f4
[    0.348048]  _do_fork+0x264/0x37c
[    0.351469]  kernel_thread+0x50/0x78
[    0.355156]  rest_init+0x2c/0x1f0
[    0.358577]  start_kernel+0x0/0x424
[    0.362168]  start_kernel+0x3ac/0x424

Fix the issue by adding RCU lock while dereferencing css for the task.

Change-Id: I1f690dcf93a3bc3c39b401942654cc4f3b302346
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent e445c189
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment