No description
Find a file
Tejun Heo 3bf4bf5406 cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock
[ Upstream commit 4f7e723643 ]

Bringing up a CPU may involve creating and destroying tasks which requires
read-locking threadgroup_rwsem, so threadgroup_rwsem nests inside
cpus_read_lock(). However, cpuset's ->attach(), which may be called with
thredagroup_rwsem write-locked, also wants to disable CPU hotplug and
acquires cpus_read_lock(), leading to a deadlock.

Fix it by guaranteeing that ->attach() is always called with CPU hotplug
disabled and removing cpus_read_lock() call from cpuset_attach().

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-and-tested-by: Imran Khan <imran.f.khan@oracle.com>
Reported-and-tested-by: Xuewen Yan <xuewen.yan@unisoc.com>
Fixes: 05c7b7a92c ("cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug")
Cc: stable@vger.kernel.org # v5.17+
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-09-15 11:30:03 +02:00
arch arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level 2022-09-15 11:30:01 +02:00
block blk-mq: fix io hung due to missing commit_rqs 2022-08-31 17:16:50 +02:00
certs
crypto
Documentation arm64: errata: Add Cortex-A510 to the repeat tlbi list 2022-09-05 10:30:04 +02:00
drivers scsi: lpfc: Add missing destroy_workqueue() in error path 2022-09-15 11:30:03 +02:00
fs NFS: Fix another fsync() issue after a server reboot 2022-09-15 11:30:03 +02:00
include NFS: Fix another fsync() issue after a server reboot 2022-09-15 11:30:03 +02:00
init
ipc
kernel cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock 2022-09-15 11:30:03 +02:00
lib crypto: lib - remove unneeded selection of XOR_BLOCKS 2022-09-05 10:30:03 +02:00
LICENSES
mm Revert "mm: kmemleak: take a full lowmem check in kmemleak_*_phys()" 2022-09-15 11:30:00 +02:00
net net/core/skbuff: Check the return value of skb_copy_bits() 2022-09-15 11:30:01 +02:00
samples
scripts kbuild: fix up permissions on scripts/pahole-flags.sh 2022-09-08 12:30:36 +02:00
security apparmor: Fix memleak in aa_simple_write_to_buffer() 2022-08-25 11:40:01 +02:00
sound ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface() 2022-09-15 11:30:02 +02:00
tools testing: selftests: nft_flowtable.sh: use random netns names 2022-09-05 10:30:12 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.15.67 2022-09-08 12:32:54 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.