]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: check that rsv field is zero in struct ptp_sys_offset_extended
authorEugene Syromiatnikov <esyr@redhat.com>
Mon, 7 Jan 2019 15:22:29 +0000 (16:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jan 2019 21:22:56 +0000 (16:22 -0500)
commita0eddcb5a1ddcb8bab92bf74404f87799f0cff01
treef5331d51a6640a6702e3098b225a60c38c5bead6
parent5af0c9c2c85b3bf88e86bc0dc638bad2e8a419bf
ptp: check that rsv field is zero in struct ptp_sys_offset_extended

Otherwise it is impossible to use it for something else, as it will break
userspace that puts garbage there.

The same check should be done in other structures, but the fact that
data in reserved fields is ignored is already part of the kernel ABI.

Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_chardev.c