]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 16 Jul 2019 23:30:09 +0000 (16:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jul 2019 02:23:24 +0000 (19:23 -0700)
commit6f990b87d675a8c4878168f2865cff542e865431
tree1d220ff01eec684823f3c95dac7244f36062251f
parent6cfdfad499d28404c76d1f890ca1eeeb70a22e6d
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl

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>
drivers/pps/pps.c