kernel_samsung_a53x/kernel/time
Jinjie Ruan a2c183d885 posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
[ Upstream commit 6e62807c7fbb3c758d233018caf94dfea9c65dbd ]

If get_clock_desc() succeeds, it calls fget() for the clockid's fd,
and get the clk->rwsem read lock, so the error path should release
the lock to make the lock balance and fput the clockid's fd to make
the refcount balance and release the fd related resource.

However the below commit left the error path locked behind resulting in
unbalanced locking. Check timespec64_valid_strict() before
get_clock_desc() to fix it, because the "ts" is not changed
after that.

Fixes: d8794ac20a29 ("posix-clock: Fix missing timespec64 check in pc_clock_settime()")
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
[pabeni@redhat.com: fixed commit message typo]
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:01 +01:00
..
alarmtimer.c alarmtimer: Minimize wakeup time 2024-11-19 18:05:33 +01:00
clockevents.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clocksource.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hrtimer.c hrtimer: Prevent queuing of hrtimer without a function callback 2024-11-23 23:20:47 +01:00
itimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jiffies.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
namespace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ntp.c ntp: Safeguard against time_constant overflow 2024-11-23 23:20:28 +01:00
ntp_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
posix-clock.c posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime() 2024-11-23 23:22:01 +01:00
posix-cpu-timers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
posix-stubs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
posix-timers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
posix-timers.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sched_clock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_udelay.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tick-broadcast-hrtimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tick-broadcast.c tick/broadcast: Move per CPU pointer access into the atomic section 2024-11-23 23:20:28 +01:00
tick-common.c tick/nohz_full: Don't abuse smp_call_function_single() in tick_setup_device() 2024-11-19 14:19:05 +01:00
tick-internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tick-oneshot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tick-sched.c tick/sched: Preserve number of idle sleeps across CPU hotplug events 2024-11-18 12:13:07 +01:00
tick-sched.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timeconst.bc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timeconv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timecounter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timekeeping.c timekeeping: Fix cross-timestamp interpolation for non-x86 2024-11-19 08:44:37 +01:00
timekeeping.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timekeeping_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timekeeping_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timer.c timers: Rename del_timer_sync() to timer_delete_sync() 2024-11-19 09:22:14 +01:00
timer_list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsyscall.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00