linux/tools/testing/selftests
Waiman Long e5ae880384 cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask()
It was found that the check to see if a partition could use up all
the cpus from the parent cpuset in update_parent_subparts_cpumask()
was incorrect. As a result, it is possible to leave parent with no
effective cpu left even if there are tasks in the parent cpuset. This
can lead to system panic as reported in [1].

Fix this probem by updating the check to fail the enabling the partition
if parent's effective_cpus is a subset of the child's cpus_allowed.

Also record the error code when an error happens in update_prstate()
and add a test case where parent partition and child have the same cpu
list and parent has task. Enabling partition in the child will fail in
this case.

[1] https://www.spinics.net/lists/cgroups/msg36254.html

Fixes: f0af1bfc27 ("cgroup/cpuset: Relax constraints to partition & cpus changes")
Cc: stable@vger.kernel.org # v6.1
Reported-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2023-01-31 12:14:02 -10:00
..
alsa kselftest/alsa: Add more coverage of sample rates and channel counts 2022-12-01 20:02:14 +01:00
amd-pstate selftests: amd-pstate: Don't delete source files via Makefile 2023-01-25 10:01:35 -07:00
arm64 Merge branch 'for-next/selftests' into for-next/core 2022-12-06 11:25:43 +00:00
bpf selftests/bpf: add a test for iter/task_vma for short-lived processes 2022-12-28 14:11:48 -08:00
breakpoints
capabilities
cgroup cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask() 2023-01-31 12:14:02 -10:00
clone3
core
cpu-hotplug selftests/cpu-hotplug: Add log info when test success 2022-10-05 11:05:18 -06:00
cpufreq
damon selftests/damon: test removed scheme sysfs dir access bug 2022-12-11 18:12:15 -08:00
dma selftests dma: fix compile error for dma_map_benchmark 2022-06-16 14:03:21 -06:00
dmabuf-heaps
drivers selftests: devlink: add a warning for interfaces coming up 2022-12-16 10:21:37 +00:00
efivarfs selftests/efivarfs: Add checking of the test return value 2022-11-22 09:09:04 -07:00
exec
filesystems Updates to various subsystems which I help look after. lib, ocfs2, 2022-08-07 10:03:24 -07:00
firmware selftests: firmware: Add firmware upload selftests 2022-04-29 16:49:36 +02:00
fpu
ftrace Trace probes updates for 6.2: 2022-12-21 18:57:24 -08:00
futex selftests/futex: fix build for clang 2022-10-18 14:13:11 -06:00
gpio selftests: gpio: Use "grep -E" instead of "egrep" 2022-11-25 10:57:23 -07:00
ia64
intel_pstate selftests/intel_pstate: fix build for ARCH=x86_64 2022-10-18 14:13:19 -06:00
iommu iommufd: Add a selftest 2022-11-30 20:16:49 -04:00
ipc
ir kselftests/ir : Improve readability of modprobe error message 2022-05-16 13:34:19 -06:00
kcmp selftests/kcmp: Make the test output consistent and clear 2022-07-08 10:55:43 -06:00
kexec selftests/kexec: fix build for ARCH=x86_64 2022-10-18 14:13:25 -06:00
kmod testing: use the copyleft-next-0.3.1 SPDX tag 2022-11-08 15:44:02 +01:00
kselftest
kvm KVM: selftests: Make reclaim_period_ms input always be positive 2023-01-22 04:10:24 -05:00
landlock Landlock updates for v6.2-rc1 2022-12-13 09:14:50 -08:00
lib
livepatch Merge branch 'for-6.1/sysfs-patched-object' into for-linus 2022-10-05 13:00:03 +02:00
lkdtm lkdtm: Update tests for memcpy() run-time warnings 2022-09-07 16:37:27 -07:00
locking
media_tests
membarrier
memfd
memory-hotplug selftests/memory-hotplug: Remove the redundant warning information 2022-10-18 14:21:18 -06:00
mincore
mount
mount_setattr
move_mount_set_group
mqueue selftests: mqueue: drop duplicate min definition 2022-04-19 19:28:47 -06:00
nci NFC: nci: Extend virtual NCI deinit test 2022-11-21 10:49:58 +00:00
net selftests/net: toeplitz: fix race on tpacket_v3 block close 2023-01-19 09:27:15 -08:00
netfilter selftests: netfilter: fix transaction test script timeout handling 2023-01-11 19:17:40 +01:00
nolibc selftests/nolibc: Always rebuild the sysroot when running a test 2022-10-28 15:17:22 -07:00
nsfs
ntb
openat2
perf_events selftests/perf_events: Add a SIGTRAP stress test with disables 2022-10-17 16:32:06 +02:00
pid_namespace
pidfd selftests/pidfd_test: Remove the erroneous ',' 2022-11-02 03:09:57 -06:00
powerpc selftests/powerpc: Fix resource leaks 2022-12-05 21:39:15 +11:00
prctl
proc proc: fix PIE proc-empty-vm, proc-pid-vm tests 2023-01-11 16:14:22 -08:00
pstore
ptp
ptrace
rcutorture torture: Make torture.sh create a properly formatted log file 2022-10-20 15:29:08 -07:00
resctrl selftests/resctrl: Fix null pointer dereference on open failed 2022-04-26 09:20:00 -06:00
rlimits
rseq selftests/rseq: check if libc rseq support is registered 2022-06-28 09:08:28 +02:00
rtc selftests: rtc: skip when RTC is not present 2022-11-15 13:30:51 -07:00
safesetid LSM: SafeSetID: add setgroups() testing to selftest 2022-07-15 18:24:42 +00:00
sched
seccomp selftests/seccomp: Check CAP_SYS_ADMIN capability in the test mode_filter_without_nnp 2022-12-02 11:32:53 -08:00
sgx selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning 2022-08-15 16:50:07 -06:00
sigaltstack
size
sparc64
splice selftests: splice_read: Fix sysfs read cases 2022-11-29 17:28:31 -07:00
static_keys
sync remove CONFIG_ANDROID 2022-07-01 10:41:09 +02:00
syscall_user_dispatch
sysctl testing: use the copyleft-next-0.3.1 SPDX tag 2022-11-08 15:44:02 +01:00
tc-testing selftests: tc-testing: Add matchJSON to tdc 2022-10-26 20:22:33 -07:00
tdx selftests/tdx: Test TDX attestation GetReport support 2022-11-17 11:04:28 -08:00
timens selftests/timens: add a test for vfork+exit 2022-10-25 15:15:52 -07:00
timers selftests: timers: clocksource-switch: adapt to kselftest framework 2022-07-14 14:36:52 -06:00
tmpfs
tpm2 selftests/tpm2: Split async tests call to separate shell script runner 2022-11-29 17:28:31 -07:00
uevent
user
user_events tracing/user_events: Use bits vs bytes for enabled status page data 2022-09-29 10:17:37 -04:00
vDSO selftests/vDSO: Add riscv getcpu & gettimeofday test 2022-11-03 03:28:01 -06:00
vm MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
watchdog selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature" 2022-10-27 02:53:37 -06:00
wireguard random: use random.trust_{bootloader,cpu} command line option only 2022-11-18 02:18:10 +01:00
x86 selftests/x86/corrupt_xstate_header: Use provided __cpuid_count() macro 2022-04-25 15:13:03 -06:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh selftests: kselftest_deps: Use "grep -E" instead of "egrep" 2022-11-25 10:55:52 -07:00
kselftest_harness.h
kselftest_install.sh
kselftest_module.h selftest: Taint kernel when test module loaded 2022-07-11 16:58:11 -06:00
kselftest.h selftests: Provide local define of __cpuid_count() 2022-04-25 15:12:36 -06:00
lib.mk kselftest: Fix error message for unconfigured LLVM builds 2023-01-12 13:38:04 -07:00
Makefile iommufd for 6.2 2022-12-14 09:15:43 -08:00
run_kselftest.sh