linux/kernel
Paul E. McKenney 354472cec0 UPSTREAM: rcu-tasks: Don't delete holdouts within trc_inspect_reader()
[ Upstream commit 1d10bf55d8 ]

As Yanfei pointed out, although invoking trc_del_holdout() is safe
from the viewpoint of the integrity of the holdout list itself,
the put_task_struct() invoked by trc_del_holdout() can result in
use-after-free errors due to later accesses to this task_struct structure
by the RCU Tasks Trace grace-period kthread.

This commit therefore removes this call to trc_del_holdout() from
trc_inspect_reader() in favor of the grace-period thread's existing call
to trc_del_holdout(), thus eliminating that particular class of
use-after-free errors.

Bug: 202954022
Change-Id: Ib1e8eb51f74db89407462cadff1bc8c17565abb4
Reported-by: "Xu, Yanfei" <yanfei.xu@windriver.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-13 13:55:50 -07:00
..
bpf ANDROID: syscall_check: add vendor hook for bpf syscall 2021-07-09 13:48:53 +00:00
cgroup ANDROID: Export memcg functions to allow module to add new files 2021-07-12 18:53:29 +00:00
configs
debug kgdb: fix to kill breakpoints on initmem after boot 2021-03-04 11:38:46 +01:00
dma UPSTREAM: swiotlb: manipulate orig_addr when tlb_addr has offset 2021-07-06 16:30:01 +00:00
entry x86/entry: Move nmi entry/exit into common code 2021-03-17 17:06:36 +01:00
events Merge 5.10.36 into android12-5.10 2021-05-13 14:22:11 +02:00
gcov gcov: re-fix clang-11+ support 2021-04-14 08:41:58 +02:00
irq FROMGIT: irqdomain: Export irq_domain_disconnect_hierarchy() 2021-08-25 00:41:42 +00:00
kcsan kcsan: Fix debugfs initcall return type 2021-05-26 12:06:54 +02:00
livepatch
locking Merge 5.10.40 into android12-5.10 2021-05-27 08:36:46 +02:00
power ANDROID: power: Add vendor hook to qos for GKI purpose. 2021-06-23 14:36:23 +00:00
printk ANDROID: logbuf: Add new logbuf vendor hook to support pr_cont() 2021-06-29 17:25:52 +00:00
rcu UPSTREAM: rcu-tasks: Don't delete holdouts within trc_inspect_reader() 2021-10-13 13:55:50 -07:00
sched ANDROID: scheduler: export task_sched_runtime 2021-08-16 20:48:25 +00:00
time FROMGIT: timer_list: Print name of per-cpu wakeup device 2021-06-04 18:33:43 +01:00
trace UPSTREAM: tracing: Fix NULL pointer dereference in start_creating 2021-09-20 19:02:31 +05:30
.gitignore kbuild: update config_data.gz only when the content of .config is changed 2021-05-11 14:47:37 +02:00
acct.c
async.c
audit_fsnotify.c
audit_tree.c
audit_watch.c
audit.c
audit.h
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
cfi.c ANDROID: cfi: explicitly clear diag in __cfi_slowpath 2021-09-02 08:55:56 +00:00
compat.c
configs.c
context_tracking.c
cpu_pm.c
cpu.c ANDROID: abi_gki_aarch64_qcom: Add symbols for 32bit execve 2021-06-07 21:59:49 +00:00
crash_core.c
crash_dump.c
cred.c ANDROID: kernel: Add vendor hook in creds 2021-03-15 15:37:57 +00:00
delayacct.c
dma.c
exec_domain.c
exit.c ANDROID: vendor_hooks: Add hooks for memory when debug 2021-03-19 04:54:07 +00:00
extable.c
fail_function.c
fork.c ANDROID: GKI: Export put_task_stack symbol 2021-07-14 09:14:16 +00:00
freezer.c ANDROID: freezer: Add vendor hook to freezer for GKI purpose. 2021-06-07 16:07:44 +00:00
futex.c Merge 5.10.36 into android12-5.10 2021-05-13 14:22:11 +02:00
gen_kheaders.sh
groups.c
hung_task.c FROMLIST: freezer: Add frozen_or_skipped() helper function 2021-06-02 15:42:01 +00:00
iomem.c
irq_work.c
jump_label.c static_call: Fix static_call_update() sanity check 2021-03-25 09:04:18 +01:00
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec_core.c kernel: kexec: remove the lock operation of system_transition_mutex 2021-02-03 23:28:37 +01:00
kexec_elf.c
kexec_file.c kernel: kexec_file: fix error return code of kexec_calculate_store_digests() 2021-05-19 10:13:09 +02:00
kexec_internal.h
kexec.c
kheaders.c
kmod.c
kprobes.c kprobes: Fix to delay the kprobes jump optimization 2021-03-04 11:38:35 +01:00
ksysfs.c
kthread.c FROMLIST: kthread: Fix kthread_mod_delayed_work vs kthread_cancel_delayed_work_sync race 2021-05-24 17:29:02 +00:00
latencytop.c
Makefile kbuild: update config_data.gz only when the content of .config is changed 2021-05-11 14:47:37 +02:00
module_signature.c module: harden ELF info handling 2021-03-25 09:04:11 +01:00
module_signing.c module: harden ELF info handling 2021-03-25 09:04:11 +01:00
module-internal.h
module.c ANDROID: debug_symbols: Add android_debug_for_each_module 2021-07-15 13:59:25 -07:00
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid_namespace.c
pid.c
profile.c
ptrace.c ptrace: make ptrace() fail if the tracee changed its pid unexpectedly 2021-05-26 12:06:49 +02:00
range.c
reboot.c
regset.c
relay.c
resource.c kernel/resource: make walk_mem_res() find all busy IORESOURCE_MEM resources 2021-05-19 10:13:09 +02:00
rseq.c
scftorture.c
scs.c FROMGIT: scs: Release kasan vmalloc poison in scs_free process 2021-10-04 15:44:53 +00:00
seccomp.c Merge 5.10.42 into android12-5.10 2021-06-03 18:47:38 +02:00
signal.c ANDROID: signal: Add vendor hook for memory reaping 2021-06-03 20:59:15 +00:00
smp.c ANDROID: Fix kernelci warnings for indentation in smp.c 2021-07-06 21:17:01 +00:00
smpboot.c kthread: Extract KTHREAD_IS_PER_CPU 2021-02-07 15:37:17 +01:00
smpboot.h
softirq.c
stackleak.c
stacktrace.c ANDROID: stacktrace: export stack_trace_save_tsk/regs 2021-04-13 13:18:04 +00:00
static_call.c static_call: Align static_call_is_init() patching condition 2021-04-07 15:00:06 +02:00
stop_machine.c
sys_ni.c
sys.c BACKPORT: arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) 2021-07-14 20:52:05 -07:00
sysctl-test.c
sysctl.c FROMLIST: mm: compaction: support triggering of proactive compaction by user 2021-06-17 14:15:58 -07:00
task_work.c FROMGIT: kasan: record task_work_add() call stack 2021-03-24 15:09:18 -07:00
taskstats.c
test_kprobes.c
torture.c
tracepoint.c ANDROID: vendor_hooks: Allow multiple attachments to restricted hooks 2021-03-31 09:08:06 +00:00
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c
up.c smp: Fix smp_call_function_single_async prototype 2021-05-14 09:50:46 +02:00
user_namespace.c Revert "Revert "capabilities: require CAP_SETFCAP to map uid 0"" 2021-05-21 13:17:04 -07:00
user-return-notifier.c
user.c ANDROID: user: Add vendor hook to user for GKI purpose 2021-06-10 01:35:22 +00:00
usermode_driver.c bpf: Fix umd memory leak in copy_process() 2021-03-30 14:32:03 +02:00
utsname_sysctl.c
utsname.c
watch_queue.c
watchdog_hld.c
watchdog.c Merge 5.10.38 into android12-5.10 2021-05-20 15:35:25 +02:00
workqueue_internal.h
workqueue.c Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00