deepin-kernel/kernel
Aruna Ramakrishna 4544b4d4a6 sched: Change nr_uninterruptible type to unsigned long
commit 36569780b0d64de283f9d6c2195fd1a43e221ee8 upstream.

The commit e6fe3f422b ("sched: Make multiple runqueue task counters
32-bit") changed nr_uninterruptible to an unsigned int. But the
nr_uninterruptible values for each of the CPU runqueues can grow to
large numbers, sometimes exceeding INT_MAX. This is valid, if, over
time, a large number of tasks are migrated off of one CPU after going
into an uninterruptible state. Only the sum of all nr_interruptible
values across all CPUs yields the correct result, as explained in a
comment in kernel/sched/loadavg.c.

Change the type of nr_uninterruptible back to unsigned long to prevent
overflows, and thus the miscalculation of load average.

Fixes: e6fe3f422b ("sched: Make multiple runqueue task counters 32-bit")

Signed-off-by: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250709173328.606794-1-aruna.ramakrishna@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 496efa228f0dd58980d301e379e5561a9b612eaa)
2025-07-28 15:19:07 +08:00
..
bpf bpf: Reject %p% format string in bprintf-like helpers 2025-07-28 15:19:05 +08:00
cgroup Revert "cgroup_freezer: cgroup_freezing: Check if not frozen" 2025-07-28 15:19:07 +08:00
configs Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
debug kdb: Use the passed prompt in kdb_position_cursor() 2024-12-10 20:40:06 +08:00
dma dma/contiguous: avoid warning about unused size_bytes 2025-05-09 23:02:17 +08:00
entry entry: Move syscall_enter_from_user_mode() to header file 2025-05-29 20:36:38 +08:00
events perf: Revert to requiring CAP_SYS_ADMIN for uprobes 2025-07-22 16:16:37 +08:00
futex futex: Don't include process MM in futex key on no-MMU 2023-11-20 11:58:53 +01:00
gcov gcov: add support for GCC 14 2024-12-10 20:29:03 +08:00
irq genirq: Make handle_enforce_irqctx() unconditionally available 2025-02-10 01:59:56 +08:00
kcsan kcsan: Turn report_filterlist_lock into a raw_spinlock 2024-12-16 00:22:41 +08:00
livepatch livepatch: Fix missing newline character in klp_resolve_symbols() 2023-11-20 11:59:25 +01:00
locking locking/lockdep: Decrease nr_unused_locks if lock unused in zap_class() 2025-05-09 18:47:25 +08:00
module keys: Allow automatic module signature with SM3 2025-07-10 21:57:22 +08:00
power PM: sleep: Print PM debug messages during hibernation 2025-06-20 14:38:47 +08:00
printk printk: Check CON_SUSPEND when unblanking a console 2025-06-10 10:34:56 +08:00
rcu rcu: Return early if callback is not specified 2025-07-14 10:42:17 +08:00
sched sched: Change nr_uninterruptible type to unsigned long 2025-07-28 15:19:07 +08:00
time clocksource: Fix the CPUs' choice in the watchdog per CPU verification 2025-07-03 11:31:59 +08:00
trace tracing/osnoise: Fix crash in timerlat_dump_stack() 2025-07-28 15:19:01 +08:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.kexec kexec: select CRYPTO from KEXEC_FILE instead of depending on it 2024-01-05 15:19:41 +01:00
Kconfig.locks
Kconfig.preempt
Makefile kernel/numa.c: Move logging out of numa.h 2024-12-10 20:25:55 +08:00
acct.c acct: block access to kernel internal filesystems 2025-03-14 17:42:52 +08:00
async.c async: Introduce async_schedule_dev_nocall() 2024-01-31 16:18:49 -08:00
audit.c audit: Send netlink ACK before setting connection in auditd_set 2024-02-05 20:14:14 +00:00
audit.h deepin: KABI: KABI reservation for audit structures 2025-01-14 21:14:42 +08:00
audit_fsnotify.c
audit_tree.c treewide: mark stuff as __ro_after_init 2025-02-24 17:12:56 +08:00
audit_watch.c audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare() 2023-11-28 17:19:56 +00:00
auditfilter.c ima: Avoid blocking in RCU read-side critical section 2024-12-10 20:39:04 +08:00
auditsc.c AOSCOS: MIPS: audit: replace magic audit syscall class numbers with macros 2024-12-25 17:00:15 +08:00
backtracetest.c
bounds.c bounds: Use the right number of bits for power-of-two CONFIG_NR_CPUS 2024-05-05 17:12:09 +08:00
capability.c lsm: constify the 'target' parameter in security_capget() 2023-08-08 16:48:47 -04:00
cfi.c
compat.c sched_getaffinity: don't assume 'cpumask_size()' is fully initialized 2023-03-14 19:32:38 -07:00
configs.c
context_tracking.c locking/atomic: treewide: use raw_atomic*_<op>() 2023-06-05 09:57:20 +02:00
cpu.c hrtimers: Handle CPU state correctly on hotplug 2025-01-24 10:13:49 +08:00
cpu_pm.c cpuidle, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() 2023-01-13 11:48:15 +01:00
crash_core.c mm: turn folio_test_hugetlb into a PageType 2024-05-05 17:12:09 +08:00
crash_dump.c
cred.c IEE: cred: Enhance credential cache initialization with SLAB_NO_MERGE 2025-07-21 15:54:34 +08:00
delayacct.c delayacct: track delays from IRQ/SOFTIRQ 2023-04-18 16:39:34 -07:00
dma.c
exec_domain.c
exit.c perf: Fix sample vs do_exit() 2025-07-03 11:32:12 +08:00
extable.c
fail_function.c kernel/fail_function: fix memory leak with using debugfs_lookup() 2023-02-08 13:36:22 +01:00
fork.c kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork() 2025-06-10 16:18:01 +08:00
freezer.c
gen_kheaders.sh kheaders: Ignore silly-rename files 2025-01-24 10:13:49 +08:00
groups.c HAOC: Add support for x86 CRED Protection (CREDP). 2025-05-12 15:02:47 +08:00
hung_task.c Include package version along with kernel release in stack traces 2024-12-31 11:42:52 +08:00
iomem.c kernel/iomem.c: remove __weak ioremap_cache helper 2023-08-21 13:37:28 -07:00
irq_work.c trace: Add trace_ipi_send_cpu() 2023-03-24 11:01:29 +01:00
jump_label.c jump_label: Fix static_key_slow_dec() yet again 2024-12-10 20:42:15 +08:00
kallsyms.c kallsyms: Change func signature for cleanup_symbol_name() 2023-08-25 15:00:36 -07:00
kallsyms_internal.h kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[] 2022-11-12 18:47:36 -08:00
kallsyms_selftest.c Modules changes for v6.6-rc1 2023-08-29 17:32:32 -07:00
kallsyms_selftest.h kallsyms: Add self-test facility 2022-11-15 00:42:02 -08:00
kcmp.c
kcov.c kcov: mark in_softirq_really() as __always_inline 2025-01-13 11:06:44 +08:00
kexec.c kernel: kexec: copy user-array safely 2023-11-28 17:19:40 +00:00
kexec_core.c kexec: do syscore_shutdown() in kernel_kexec 2024-01-31 16:18:56 -08:00
kexec_elf.c kexec: initialize ELF lowest address to ULONG_MAX 2025-04-14 15:49:22 +08:00
kexec_file.c kexec_file: fix elfcorehdr digest exclusion when CONFIG_CRASH_HOTPLUG=y 2024-12-10 20:41:17 +08:00
kexec_internal.h
kheaders.c kheaders: Use array declaration instead of char 2023-03-24 20:10:59 -07:00
kprobes.c kprobes: Fix to check symbol prefixes correctly 2024-12-10 20:40:25 +08:00
ksyms_common.c kallsyms: make kallsyms_show_value() as generic function 2023-06-08 12:27:20 -07:00
ksysfs.c crash: hotplug support for kexec_load() 2023-08-24 16:25:14 -07:00
kthread.c HAOC: Support pointer protection for x86 IEE (IEE_PTRP) 2025-05-12 15:02:47 +08:00
latencytop.c
module_signature.c
notifier.c notifiers: add tracepoints to the notifiers infrastructure 2023-04-08 13:45:38 -07:00
nsproxy.c nsproxy: Convert nsproxy.count to refcount_t 2023-08-21 11:29:12 -07:00
numa.c kernel/numa.c: Move logging out of numa.h 2024-12-10 20:25:55 +08:00
padata.c padata: do not leak refcount in reorder_work 2025-06-10 16:18:03 +08:00
panic.c objtool, panic: Disable SMAP in __stack_chk_fail() 2025-05-09 23:02:47 +08:00
params.c module: ensure that kobject_put() is safe for module type kobjects 2025-05-23 23:46:06 +08:00
pid.c pidfd: prevent a kernel-doc warning 2023-09-19 13:21:33 -07:00
pid_namespace.c zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING 2024-12-10 20:26:52 +08:00
pid_sysctl.h memfd: replace ratcheting feature from vm.memfd_noexec with hierarchy 2023-08-21 13:37:59 -07:00
profile.c profiling: remove profile=sleep support 2024-12-10 20:40:24 +08:00
ptrace.c ptrace: Provide set/get interface for syscall user dispatch 2023-04-16 14:23:07 +02:00
range.c
reboot.c kernel/reboot: emergency_restart: Set correct system_state 2023-11-28 17:20:04 +00:00
regset.c
relay.c kernel: relay: remove unnecessary NULL values from relay_open_buf 2023-08-18 10:18:55 -07:00
resource.c resource: fix region_intersects() vs add_memory_driver_managed() 2024-12-10 20:42:30 +08:00
resource_kunit.c
rseq.c rseq: Fix segfault on registration when rseq_cs is non-zero 2025-07-22 16:16:48 +08:00
scftorture.c scftorture: Pause testing after memory-allocation failure 2023-07-14 15:02:57 -07:00
scs.c scs: add support for dynamic shadow call stacks 2022-11-09 18:06:35 +00:00
seccomp.c seccomp: Add missing kerndoc notations 2023-08-17 12:32:15 -07:00
signal.c posix-timers: Target group sigqueue to current task only if not exiting 2024-12-10 20:45:17 +08:00
smp.c smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu() 2024-12-10 20:41:25 +08:00
smpboot.c kthread: add kthread_stop_put 2024-12-10 20:26:20 +08:00
smpboot.h
softirq.c lockdep: Fix wait context check on softirq for PREEMPT_RT 2025-06-10 10:34:52 +08:00
stackleak.c stackleak: allow to specify arch specific stackleak poison function 2023-04-20 11:36:35 +02:00
stacktrace.c
static_call.c
static_call_inline.c x86/static-call: provide a way to do very early static-call updates 2024-12-23 21:10:05 +08:00
stop_machine.c
sys.c HAOC: Add support for x86 CRED Protection (CREDP). 2025-05-12 15:02:47 +08:00
sys_ni.c syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-12-10 20:38:56 +08:00
sysctl-test.c
sysctl.c v6.5-rc1-sysctl-next 2023-06-28 16:05:21 -07:00
task_work.c Export symbols needed by binder 2024-12-31 11:42:52 +08:00
taskstats.c
torture.c rcutorture: Fix stuttering races and other issues 2023-11-28 17:20:08 +00:00
tracepoint.c tracepoint: Allow livepatch module add trace event 2023-02-18 14:34:36 -05:00
tsacct.c
ucount.c ucounts: fix counter leak in inc_rlimit_get_ucounts() 2024-12-10 20:43:46 +08:00
uid16.c
uid16.h
umh.c HAOC: Add support for x86 CRED Protection (CREDP). 2025-05-12 15:02:47 +08:00
up.c
user-return-notifier.c
user.c kernel/user: Allow user_struct::locked_vm to be usable for iommufd 2022-11-30 20:16:49 -04:00
user_namespace.c HAOC: Add support for x86 CRED Protection (CREDP). 2025-05-12 15:02:47 +08:00
usermode_driver.c
utsname.c
utsname_sysctl.c utsname: simplify one-level sysctl registration for uts_kern_table 2023-04-13 11:49:35 -07:00
vhost_task.c vhost_task: Handle SIGKILL by flushing work and exiting 2024-12-10 20:39:01 +08:00
watch_queue.c watch_queue: fix pipe accounting mismatch 2025-04-14 15:48:34 +08:00
watchdog.c watchdog: fix watchdog may detect false positive of softlockup 2025-07-03 11:31:56 +08:00
watchdog_buddy.c watchdog/hardlockup: move SMP barriers from common code to buddy code 2023-06-19 16:25:28 -07:00
watchdog_perf.c watchdog/perf: properly initialize the turbo mode timestamp and rearm counter 2024-12-10 20:40:04 +08:00
workqueue.c treewide: mark stuff as __ro_after_init 2025-02-24 17:12:56 +08:00
workqueue_internal.h workqueue: Drop the special locking rule for worker->flags and worker_pool->flags 2023-08-07 15:57:22 -10:00