linux-stable/kernel
Siddh Raman Pant 26ebeffff2 Revert "tracing/trigger: Fix to return error if failed to alloc snapshot"
This reverts commit 56cfbe6071 which is
commit 0958b33ef5 upstream.

The change has an incorrect assumption about the return value because
in the current stable trees for versions 5.15 and before, the following
commit responsible for making 0 a success value is not present:
b8cc44a4d3 ("tracing: Remove logic for registering multiple event triggers at a time")

The return value should be 0 on failure in the current tree, because in
the functions event_trigger_callback() and event_enable_trigger_func(),
we have:

	ret = cmd_ops->reg(glob, trigger_ops, trigger_data, file);
	/*
	 * The above returns on success the # of functions enabled,
	 * but if it didn't find any functions it returns zero.
	 * Consider no functions a failure too.
	 */
	if (!ret) {
		ret = -ENOENT;

Cc: stable@kernel.org # 5.15, 5.10, 5.4, 4.19
Signed-off-by: Siddh Raman Pant <siddh.raman.pant@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-02 16:23:36 +02:00
..
bpf bpf: Protect against int overflow for stack access size 2024-04-13 12:59:16 +02:00
cgroup cgroup: Remove duplicates in cgroup v1 tasks file 2023-10-25 11:54:16 +02:00
configs
debug kdb: Fix a potential buffer overflow in kdb_local() 2024-01-25 14:37:56 -08:00
dma dma-mapping: clear dev->dma_mem to NULL after freeing it 2024-01-25 14:37:45 -08:00
entry
events perf/core: Fix reentry problem in perf_output_read_group() 2024-04-13 12:59:00 +02:00
futex futex: Don't include process MM in futex key on no-MMU 2023-11-20 11:06:44 +01:00
gcov
irq genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware 2023-11-28 16:54:58 +00:00
kcsan kcsan: Don't expect 64 bits atomic builtins from 32 bits architectures 2023-07-27 08:43:57 +02:00
livepatch livepatch: Fix missing newline character in klp_resolve_symbols() 2023-11-20 11:06:52 +01:00
locking lockdep: Fix block chain corruption 2023-12-08 08:46:09 +01:00
power PM: suspend: Set mem_sleep_current during kernel command line setup 2024-04-13 12:58:13 +02:00
printk printk: Update @console_may_schedule in console_trylock_spinning() 2024-04-13 12:58:54 +02:00
rcu rcu-tasks: Provide rcu_trace_implies_rcu_gp() 2024-03-26 18:21:45 -04:00
sched sched/rt: Disallow writing invalid values to sched_rt_period_us 2024-03-01 13:16:43 +01:00
time timers: Rename del_timer_sync() to timer_delete_sync() 2024-04-13 12:57:58 +02:00
trace Revert "tracing/trigger: Fix to return error if failed to alloc snapshot" 2024-05-02 16:23:36 +02:00
.gitignore
acct.c
async.c async: Introduce async_schedule_dev_nocall() 2024-02-23 08:41:53 +01:00
audit.c audit: Send netlink ACK before setting connection in auditd_set 2024-02-23 08:42:03 +01:00
audit.h
audit_fsnotify.c
audit_tree.c
audit_watch.c audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare() 2023-11-28 16:54:56 +00:00
auditfilter.c
auditsc.c audit: fix possible soft lockup in __audit_inode_child() 2023-09-19 12:20:13 +02:00
backtracetest.c
bounds.c bounds: support non-power-of-two CONFIG_NR_CPUS 2024-04-13 12:58:08 +02:00
capability.c
compat.c
configs.c
context_tracking.c
cpu.c x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n 2024-05-02 16:23:35 +02:00
cpu_pm.c
crash_core.c
crash_dump.c
cred.c cred: switch to using atomic_long_t 2023-12-20 15:44:30 +01:00
delayacct.c
dma.c
exec_domain.c
exit.c
extable.c
fail_function.c
fork.c kernel/fork: beware of __put_task_struct() calling context 2023-09-23 11:01:05 +02:00
freezer.c
gen_kheaders.sh
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec.c
kexec_core.c kexec: fix a memory leak in crash_shrink_memory() 2023-07-27 08:43:40 +02:00
kexec_elf.c
kexec_file.c
kexec_internal.h
kheaders.c
kmod.c
kprobes.c kprobes: Fix possible use-after-free issue on kprobe registration 2024-05-02 16:23:36 +02:00
ksysfs.c
kthread.c
latencytop.c
Makefile
module-internal.h
module.c modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules 2023-09-19 12:20:02 +02:00
module_signature.c
module_signing.c
notifier.c
nsproxy.c
padata.c crypto: pcrypt - Fix hungtask for PADATA_RESET 2023-11-28 16:54:51 +00:00
panic.c panic: Flush kernel log buffer at the end 2024-04-13 12:59:40 +02:00
params.c
pid.c
pid_namespace.c
profile.c
ptrace.c
range.c
reboot.c kernel/reboot: emergency_restart: Set correct system_state 2023-11-28 16:54:58 +00:00
regset.c
relay.c
resource.c
rseq.c
scftorture.c scftorture: Forgive memory-allocation failure if KASAN 2023-09-23 11:01:05 +02:00
scs.c
seccomp.c seccomp: Invalidate seccomp mode to catch death failures 2024-03-01 13:16:46 +01:00
signal.c
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
static_call.c
stop_machine.c
sys.c getrusage: use sig->stats_lock rather than lock_task_sighand() 2024-03-15 10:48:22 -04:00
sys_ni.c
sysctl-test.c
sysctl.c sched/rt: Disallow writing invalid values to sched_rt_period_us 2024-03-01 13:16:43 +01:00
task_work.c
taskstats.c
test_kprobes.c
torture.c torture: Fix hang during kthread shutdown phase 2023-08-30 16:23:17 +02:00
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c
up.c
user-return-notifier.c
user.c
user_namespace.c
usermode_driver.c
utsname.c
utsname_sysctl.c
watch_queue.c
watchdog.c watchdog: move softlockup_panic back to early_param 2023-11-28 16:54:56 +00:00
watchdog_hld.c watchdog/perf: more properly prevent false positives with turbo modes 2023-07-27 08:43:40 +02:00
workqueue.c Revert "workqueue: remove unused cancel_work()" 2023-12-08 08:46:13 +01:00
workqueue_internal.h