android_kernel_oneplus_msm8998/kernel
Miroslav Lichvar 90a238a8a2 ntp: Allow TAI-UTC offset to be set to zero
[ Upstream commit fdc6bae940ee9eb869e493990540098b8c0fd6ab ]

The ADJ_TAI adjtimex mode sets the TAI-UTC offset of the system clock.
It is typically set by NTP/PTP implementations and it is automatically
updated by the kernel on leap seconds. The initial value is zero (which
applications may interpret as unknown), but this value cannot be set by
adjtimex. This limitation seems to go back to the original "nanokernel"
implementation by David Mills.

Change the ADJ_TAI check to accept zero as a valid TAI-UTC offset in
order to allow setting it back to the initial value.

Fixes: 153b5d054a ("ntp: support for TAI")
Suggested-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Link: https://lkml.kernel.org/r/20190417084833.7401-1-mlichvar@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-22 08:18:19 +02:00
..
bpf bpf: Prevent memory disambiguation attack 2018-12-17 21:55:15 +01:00
configs
debug kdb: use memmove instead of overlapping memcpy 2018-12-13 09:21:29 +01:00
events perf/core: Restore mmap record type correctly 2019-04-27 09:33:56 +02:00
gcov gcov: disable for COMPILE_TEST 2018-01-23 19:50:10 +01:00
irq genirq: Prevent use-after-free and work list corruption 2019-05-16 19:45:04 +02:00
livepatch
locking Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()" 2019-04-27 09:34:02 +02:00
power PM / Hibernate: Call flush_icache_range() on pages restored in-place 2019-04-03 06:23:24 +02:00
printk printk: Fix panic caused by passing log_buf_len to command line 2018-11-21 09:27:35 +01:00
rcu rcutorture: Fix cleanup path for invalid torture_type strings 2019-06-11 12:24:04 +02:00
sched sched/core: Handle overflow in cpu_shares_write_u64 2019-06-11 12:23:58 +02:00
time ntp: Allow TAI-UTC offset to be set to zero 2019-06-22 08:18:19 +02:00
trace tracing: Fix partial reading of trace event's id file 2019-06-11 12:23:46 +02:00
.gitignore
acct.c kernel/acct.c: fix the acct->needcheck check in check_free_space() 2018-01-10 09:27:08 +01:00
async.c kernel/async.c: revert "async: simplify lowest_in_progress()" 2018-02-16 20:09:45 +01:00
audit.c audit: return on memory error to avoid null pointer dereference 2018-05-30 07:49:16 +02:00
audit.h
audit_fsnotify.c
audit_tree.c
audit_watch.c audit: fix use-after-free in audit_add_watch 2018-09-26 08:35:08 +02:00
auditfilter.c audit: fix a memory leak bug 2019-06-11 12:23:58 +02:00
auditsc.c audit: allow not equal op for audit by executable 2018-08-06 16:24:38 +02:00
backtracetest.c
bounds.c kbuild: fix kernel/bounds.c 'W=1' warning 2018-11-21 09:27:35 +01:00
capability.c
cgroup.c cgroup: Fix deadlock in cpu hotplug path 2018-10-13 09:11:33 +02:00
cgroup_freezer.c
cgroup_pids.c
compat.c
configs.c
context_tracking.c
cpu.c cpu/speculation: Add 'mitigations=' cmdline option 2019-05-16 19:45:15 +02:00
cpu_pm.c
cpuset.c sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs 2017-10-12 11:27:35 +02:00
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c kernel/exit.c: release ptraced tasks before zap_pid_ns_processes 2019-02-06 19:43:07 +01:00
extable.c kernel/extable.c: mark core_kernel_text notrace 2017-07-21 07:44:56 +02:00
fork.c fork: record start_time late 2019-01-13 10:05:32 +01:00
freezer.c
futex.c futex: Ensure that futex address is aligned in handle_futex_death() 2019-04-03 06:23:15 +02:00
futex_compat.c
groups.c kernel: make groups_sort calling a responsibility group_info allocators 2018-01-10 09:27:10 +01:00
hung_task.c kernel/hung_task.c: break RCU locks based on jiffies 2019-02-20 10:13:14 +01:00
irq_work.c
jump_label.c jump_label: Invoke jump_label_test() via early_initcall() 2017-12-16 10:33:55 +01:00
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kexec.c
kexec_core.c
kexec_file.c
kexec_internal.h
kmod.c
kprobes.c kprobes: Fix error check when reusing optimized probes 2019-04-27 09:34:02 +02:00
ksysfs.c
kthread.c kthread, tracing: Don't expose half-written comm when creating kthreads 2018-09-09 20:04:34 +02:00
latencytop.c
Makefile
membarrier.c
memremap.c mm, devm_memremap_pages: kill mapping "System RAM" support 2019-01-13 10:05:32 +01:00
module-internal.h
module.c module: exclude SHN_UNDEF symbols from kallsyms api 2018-10-10 08:52:07 +02:00
module_signing.c
notifier.c
nsproxy.c
padata.c
panic.c kernel/panic.c: add missing \n 2017-07-05 14:37:19 +02:00
params.c
pid.c pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid() 2018-04-13 19:50:03 +02:00
pid_namespace.c
profile.c profile: hide unused functions when !CONFIG_PROC_FS 2018-02-25 11:03:44 +01:00
ptrace.c x86/speculation: Apply IBPB more strictly to avoid cross-process data leak 2019-05-16 19:45:09 +02:00
range.c
reboot.c
relay.c kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE 2018-05-30 07:49:00 +02:00
resource.c resource: fix integer overflow at reallocation 2018-04-24 09:32:05 +02:00
seccomp.c seccomp: Move speculation migitation control to arch code 2018-07-25 10:18:27 +02:00
signal.c kernel/signal.c: trace_signal_deliver when signal_group_exit 2019-06-11 12:24:10 +02:00
smp.c
smpboot.c
smpboot.h
softirq.c
stacktrace.c
stop_machine.c
sys.c kernel/sys.c: prctl: fix false positive in validate_prctl_map() 2019-06-22 08:18:18 +02:00
sys_ni.c
sysctl.c sysctl: return -EINVAL if val violates minmax 2019-06-22 08:18:17 +02:00
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c tracepoint: Do not warn on ENOMEM 2018-05-16 10:06:47 +02:00
tsacct.c
uid16.c kernel: make groups_sort calling a responsibility group_info allocators 2018-01-10 09:27:10 +01:00
up.c
user-return-notifier.c
user.c
user_namespace.c userns: move user access out of the mutex 2018-09-09 20:04:35 +02:00
utsname.c
utsname_sysctl.c sys: don't hold uts_sem while accessing userspace memory 2018-09-09 20:04:35 +02:00
watchdog.c
workqueue.c workqueue: use put_device() instead of kfree() 2018-05-30 07:49:04 +02:00
workqueue_internal.h workqueue: Fix NULL pointer dereference 2017-11-15 17:13:11 +01:00