]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()
authorGatien Chevallier <gatien.chevallier@foss.st.com>
Fri, 30 May 2025 23:09:23 +0000 (16:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:29 +0000 (11:07 +0100)
commit2e42f29f0c8986acbc37b4610898e6d3acb2f697
treef1fa43ab62bba66d6e933b12e40fda879e63eb53
parent8e03f1c7d50343bf21da54873301bc4fa647479f
Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()

commit 8f38219fa139623c29db2cb0f17d0a197a86e344 upstream.

gpio_keys_irq_isr() and gpio_keys_irq_timer() access the same resources.
There could be a concurrent access if a GPIO interrupt occurs in parallel
of a HR timer interrupt.

Guard back those resources with a spinlock.

Fixes: 019002f20cb5 ("Input: gpio-keys - use hrtimer for release timer")
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Link: https://lore.kernel.org/r/20250528-gpio_keys_preempt_rt-v2-2-3fc55a9c3619@foss.st.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/keyboard/gpio_keys.c