android_kernel_oneplus_msm8998/drivers/pps
Miroslav Lichvar d65f740eff drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 upstream.

The PPS assert/clear offset corrections are set by the PPS_SETPARAMS
ioctl in the pps_ktime structs, which also contain flags.  The flags are
not initialized by applications (using the timepps.h header) and they
are not used by the kernel for anything except returning them back in
the PPS_GETPARAMS ioctl.

Set the flags to zero to make it clear they are unused and avoid leaking
uninitialized data of the PPS_SETPARAMS caller to other applications
that have a read access to the PPS device.

Link: http://lkml.kernel.org/r/20190702092251.24303-1-mlichvar@redhat.com
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Cc: Greg KH <greg@kroah.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-04 09:35:02 +02:00
..
clients pps: do not crash when failed to register 2016-08-10 11:49:25 +02:00
generators pps: remove unreachable code 2011-03-22 17:44:17 -07:00
kapi.c ntp/pps: use y2038 safe types in pps_event_time 2015-10-01 09:59:16 -07:00
kc.c ntp/pps: use y2038 safe types in pps_event_time 2015-10-01 09:59:16 -07:00
kc.h pps: add kernel consumer support 2011-01-13 08:03:21 -08:00
Kconfig pps: hide more configuration symbols behind CONFIG_PPS 2013-04-30 17:04:08 -07:00
Makefile pps: add parallel port PPS signal generator 2011-01-13 08:03:21 -08:00
pps.c drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-08-04 09:35:02 +02:00
sysfs.c PPS: convert class code to use dev_groups 2013-08-19 21:22:34 -07:00