linux-stable/kernel/time
Linus Torvalds a88649b495 Fix memory leak in posix_clock_open()
commit 5b4cdd9c56 upstream.

If the clk ops.open() function returns an error, we don't release the
pccontext we allocated for this clock.

Re-organize the code slightly to make it all more obvious.

Reported-by: Rohit Keshri <rkeshri@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Fixes: 60c6946675 ("posix-clock: introduce posix_clock_context concept")
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-03 15:11:42 +02:00
..
Kconfig clocksource: Loosen clocksource watchdog constraints 2023-01-03 20:43:45 -08:00
Makefile
alarmtimer.c alarmtimer: Use maximum alarm time for suspend 2023-10-09 15:03:28 +02:00
clockevents.c clockevents: Repair kernel-doc for clockevent_delta2ns() 2022-12-01 13:35:41 +01:00
clocksource-wdtest.c
clocksource.c clocksource: Skip watchdog check for large watchdog intervals 2024-01-31 16:21:21 -08:00
hrtimer.c hrtimer: Report offline hrtimer enqueue 2024-02-16 19:14:29 +01:00
itimer.c
jiffies.c
namespace.c vdso/timens: Refactor copy-pasted find_timens_vvar_page() helper into one copy 2022-12-01 11:35:40 +01:00
ntp.c
ntp_internal.h
posix-clock.c Fix memory leak in posix_clock_open() 2024-04-03 15:11:42 +02:00
posix-cpu-timers.c posix-cpu-timers: Implement the missing timer_wait_running callback 2023-04-21 15:34:33 +02:00
posix-stubs.c posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2023-12-20 21:30:27 -08:00
posix-timers.c posix-timers: Refer properly to CONFIG_HIGH_RES_TIMERS 2023-06-18 22:41:53 +02:00
posix-timers.h
sched_clock.c time/sched_clock: Provide sched_clock_noinstr() 2023-06-05 21:11:04 +02:00
test_udelay.c time/debug: Fix memory leak with using debugfs_lookup() 2023-02-09 20:12:27 +01:00
tick-broadcast-hrtimer.c time/tick-broadcast: Remove RCU_NONIDLE() usage 2023-01-13 11:48:16 +01:00
tick-broadcast.c tick/broadcast: Make broadcast device replacement work correctly 2023-05-08 23:18:16 +02:00
tick-common.c tick/common: Align tick period during sched_timer setup 2023-06-16 20:45:28 +02:00
tick-internal.h
tick-legacy.c
tick-oneshot.c time: Fix various kernel-doc problems 2023-01-03 11:07:58 +01:00
tick-sched.c tick/sched: Preserve number of idle sleeps across CPU hotplug events 2024-01-31 16:21:21 -08:00
tick-sched.h timers/nohz: Protect idle/iowait sleep time under seqcount 2023-04-18 16:35:12 +02:00
time.c time: add kernel-doc in time.c 2023-07-14 13:47:07 -06:00
time_test.c time: test: Fix incorrect format specifier 2024-03-26 18:18:00 -04:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c timekeeping: Fix cross-timestamp interpolation for non-x86 2024-03-26 18:18:02 -04:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c timers: Provide timer_shutdown[_sync]() 2022-11-24 15:09:12 +01:00
timer_list.c
vsyscall.c