From 597dda48629c18b15d53fff8acc1dfeb4208dd45 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 25 Mar 2020 10:57:54 -0700 Subject: [PATCH] UPSTREAM: Input: fix stale timestamp on key autorepeat events We need to refresh timestamp when emitting key autorepeat events, otherwise they will carry timestamp of the original key press event. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206929 Fixes: 3b51c44bd693 ("Input: allow drivers specify timestamp for input events") Cc: stable@vger.kernel.org Reported-by: teika kazura Tested-by: teika kazura Signed-off-by: Dmitry Torokhov (cherry picked from commit 4134252ab7e2c339a54302b88496cb5a89cdbaec) Signed-off-by: Greg Kroah-Hartman Change-Id: I7062d933a35b122f0ffc1c06d0dd7e60561ef97c --- drivers/input/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/input.c b/drivers/input/input.c index 57072d5a6ae0..f96c40aede85 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -193,6 +193,7 @@ static void input_repeat_key(struct timer_list *t) input_value_sync }; + input_set_timestamp(dev, ktime_get()); input_pass_values(dev, vals, ARRAY_SIZE(vals)); if (dev->rep[REP_PERIOD])