]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning
authorWaiman Long <longman@redhat.com>
Thu, 3 Feb 2022 03:31:03 +0000 (22:31 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 3 Feb 2022 15:59:01 +0000 (05:59 -1000)
commit511c7c9bb2afedd5566ecc0f8ee4e04fd2b331df
treec677349e0e219e802f1c94ad20b75b9aca42a2c3
parent3ae097a730e69624638ff1f15fd504f2a4443b96
cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning

It was found that a "suspicious RCU usage" lockdep warning was issued
with the rcu_read_lock() call in update_sibling_cpumasks().  It is
because the update_cpumasks_hier() function may sleep. So we have
to release the RCU lock, call update_cpumasks_hier() and reacquire
it afterward.

Also add a percpu_rwsem_assert_held() in update_sibling_cpumasks()
instead of stating that in the comment.

Fixes: 4d7996eca56f ("cpuset: Track cpusets that use parent's effective_cpus")
Signed-off-by: Waiman Long <longman@redhat.com>
Tested-by: Phil Auld <pauld@redhat.com>
Reviewed-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c