From: ovidiu.panait@windriver.com
To: stable@vger.kernel.org
Cc: qyousef@layalina.io, Ovidiu Panait <ovidiu.panait@windriver.com>
Subject: [PATCH 5.10 0/4] cgroup: Fix suspicious rcu_dereference_check() warning
Date: Fri, 29 Sep 2023 16:14:14 +0300 [thread overview]
Message-ID: <20230929131418.821640-1-ovidiu.panait@windriver.com> (raw)
From: Ovidiu Panait <ovidiu.panait@windriver.com>
When booting the 5.10-stable kernel on the zcu102 board with
CONFIG_PROVE_RCU=y, the following warning is present:
=============================
WARNING: suspicious RCU usage
5.10.194-yocto-standard #1 Not tainted
-----------------------------
include/linux/cgroup.h:495 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
9 locks held by kworker/2:2/106:
#0: ffffff8800048948 ((wq_completion)events){..}-{0:0}, at: process_one_work+0x1f8/0x634
#1: ffffffc014c4bda8 (deferred_probe_work){..}-{0:0}, at: process_one_work+0x1f8/0x634
#2: ffffff880005d9a0 (&dev->mutex){....}-{3:3}, at: __device_attach+0x40/0x1c0
#3: ffffffc011c70cb0 (cpu_hotplug_lock){++++}-{0:0}, at: cpus_read_lock+0x18/0x24
#4: ffffff8800b10928 (subsys mutex#5){..}-{3:3}, at: subsys_interface_register+0x58/0x120
#5: ffffff8805e78c00 (&policy->rwsem){..}-{3:3}, at: cpufreq_online+0x590/0x960
#6: ffffffc012a9e770 (cpuset_mutex){..}-{3:3}, at: cpuset_lock+0x24/0x30
#7: ffffff880567bd80 (&p->pi_lock){..}-{2:2}, at: task_rq_lock+0x44/0xf0
#8: ffffff887aff50d8 (&rq->lock){..}-{2:2}, at: task_rq_lock+0x5c/0xf0
stack backtrace:
CPU: 2 PID: 106 Comm: kworker/2:2 Not tainted 5.10.194-yocto-standard #1
Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
Workqueue: events deferred_probe_work_func
Call trace:
dump_backtrace+0x0/0x1a4
show_stack+0x20/0x2c
dump_stack+0xf0/0x13c
lockdep_rcu_suspicious+0xe4/0xf8
inc_dl_tasks_cs+0xb8/0xbc
switched_to_dl+0x38/0x280
__sched_setscheduler+0x204/0x860
sched_setattr_nocheck+0x20/0x30
sugov_init+0x1b8/0x380
cpufreq_init_governor.part.0+0x60/0xe0
cpufreq_set_policy+0x1d0/0x33c
cpufreq_online+0x35c/0x960
cpufreq_add_dev+0x8c/0xa0
subsys_interface_register+0x10c/0x120
cpufreq_register_driver+0x148/0x2a4
dt_cpufreq_probe+0x288/0x3d0
platform_drv_probe+0x5c/0xb0
really_probe+0xe0/0x4ac
driver_probe_device+0x60/0xf4
__device_attach_driver+0xc0/0x12c
bus_for_each_drv+0x80/0xe0
__device_attach+0xb0/0x1c0
device_initial_probe+0x1c/0x30
bus_probe_device+0xa8/0xb0
deferred_probe_work_func+0x94/0xd0
process_one_work+0x2b8/0x634
worker_thread+0x7c/0x474
kthread+0x154/0x160
ret_from_fork+0x10/0x34
The warning was introduced in v5.10.193 by commit:
5ac05ce56843 "(sched/cpuset: Keep track of SCHED_DEADLINE task in cpusets)"
This issue was also reported for 5.15 here:
https://lore.kernel.org/lkml/CA+G9fYv9xTu4bKJGy=e=KZSG5pZ+tJAmfZr=0dbuKNs=9OOKhA@mail.gmail.com/
Backport commit f2aa197e4794 ("cgroup: Fix suspicious rcu_dereference_check()
usage warning") and its dependencies to get rid of this warning.
Andrey Ryabinin (1):
sched/cpuacct: Fix user/system in shown cpuacct.usage*
Chengming Zhou (3):
sched/cpuacct: Fix charge percpu cpuusage
sched/cpuacct: Optimize away RCU read lock
cgroup: Fix suspicious rcu_dereference_check() usage warning
include/linux/cgroup.h | 3 +-
kernel/sched/cpuacct.c | 84 +++++++++++++++++-------------------------
2 files changed, 35 insertions(+), 52 deletions(-)
--
2.31.1
next reply other threads:[~2023-09-29 13:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-29 13:14 ovidiu.panait [this message]
2023-09-29 13:14 ` [PATCH 5.10 1/4] sched/cpuacct: Fix user/system in shown cpuacct.usage* ovidiu.panait
2023-09-29 13:14 ` [PATCH 5.10 2/4] sched/cpuacct: Fix charge percpu cpuusage ovidiu.panait
2023-09-29 13:14 ` [PATCH 5.10 3/4] sched/cpuacct: Optimize away RCU read lock ovidiu.panait
2023-09-29 13:14 ` [PATCH 5.10 4/4] cgroup: Fix suspicious rcu_dereference_check() usage warning ovidiu.panait
2023-10-03 11:32 ` [PATCH 5.10 0/4] cgroup: Fix suspicious rcu_dereference_check() warning Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230929131418.821640-1-ovidiu.panait@windriver.com \
--to=ovidiu.panait@windriver.com \
--cc=qyousef@layalina.io \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox