[PATCH v2 0/2] Input: gpio-keys - Fixes for interrupt callbacks

Gatien Chevallier posted 2 patches 6 months, 3 weeks ago
drivers/input/keyboard/gpio_keys.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
[PATCH v2 0/2] Input: gpio-keys - Fixes for interrupt callbacks
Posted by Gatien Chevallier 6 months, 3 weeks ago
This patchset fixes a "BUG: sleeping function called from invalid
context" when CFG_PREEMPT_RT is enabled and a possible concurrent access
on button data between gpio_keys_irq_timer() and gpio_keys_irq_isr().

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
Changes in v2:
- Split fixes into two commits
- Use guard() macro to handle spinlock
- Link to v1: https://lore.kernel.org/r/20250526-gpio_keys_preempt_rt-v1-1-09ddadf8e19d@foss.st.com

---
Fabrice Gasnier (1):
      Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT

Gatien Chevallier (1):
      Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()

 drivers/input/keyboard/gpio_keys.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
base-commit: 0ff41df1cb268fc69e703a08a57ee14ae967d0ca
change-id: 20250526-gpio_keys_preempt_rt-10619c8fa916

Best regards,
-- 
Gatien Chevallier <gatien.chevallier@foss.st.com>
Re: [PATCH v2 0/2] Input: gpio-keys - Fixes for interrupt callbacks
Posted by Dmitry Torokhov 6 months, 3 weeks ago
On Wed, May 28, 2025 at 10:50:20AM +0200, Gatien Chevallier wrote:
> This patchset fixes a "BUG: sleeping function called from invalid
> context" when CFG_PREEMPT_RT is enabled and a possible concurrent access
> on button data between gpio_keys_irq_timer() and gpio_keys_irq_isr().
> 
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>

Applied, thank you.

-- 
Dmitry