OSDN Git Service

Input: input_event - fix struct padding on sparc64
authorArnd Bergmann <arnd@arndb.de>
Fri, 13 Dec 2019 22:06:58 +0000 (14:06 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 13 Dec 2019 23:00:36 +0000 (15:00 -0800)
commitf729a1b0f8df7091cea3729fc0e414f5326e1163
tree9781ad354610754e1c7c459f9b661156f6ebaa7d
parentadd218099472805a06bc334852d8e2af5d74e4ac
Input: input_event - fix struct padding on sparc64

Going through all uses of timeval, I noticed that we screwed up
input_event in the previous attempts to fix it:

The time fields now match between kernel and user space, but all following
fields are in the wrong place.

Add the required padding that is implied by the glibc timeval definition
to fix the layout, and use a struct initializer to avoid leaking kernel
stack data.

Fixes: 141e5dcaa735 ("Input: input_event - fix the CONFIG_SPARC64 mixup")
Fixes: 2e746942ebac ("Input: input_event - provide override for sparc64")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20191213204936.3643476-2-arnd@arndb.de
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/evdev.c
drivers/input/misc/uinput.c
include/uapi/linux/input.h