Skip to content

Commit 79abb84

Browse files
author
CKI Backport Bot
committed
Input: serio - define serio_pause_rx guard to pause and resume serio ports
JIRA: https://issues.redhat.com/browse/RHEL-81215 CVE: CVE-2025-21746 commit 0e45a09 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Sep 4 21:17:06 2024 -0700 Input: serio - define serio_pause_rx guard to pause and resume serio ports serio_pause_rx() and serio_continue_rx() are usually used together to temporarily stop receiving interrupts/data for a given serio port. Define "serio_pause_rx" guard for this so that the port is always resumed once critical section is over. Example: scoped_guard(serio_pause_rx, elo->serio) { elo->expected_packet = toupper(packet[0]); init_completion(&elo->cmd_done); } Link: https://lore.kernel.org/r/20240905041732.2034348-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent 134517e commit 79abb84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/linux/serio.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define _SERIO_H
77

88

9+
#include <linux/cleanup.h>
910
#include <linux/types.h>
1011
#include <linux/interrupt.h>
1112
#include <linux/list.h>
@@ -161,4 +162,6 @@ static inline void serio_continue_rx(struct serio *serio)
161162
spin_unlock_irq(&serio->lock);
162163
}
163164

165+
DEFINE_GUARD(serio_pause_rx, struct serio *, serio_pause_rx(_T), serio_continue_rx(_T))
166+
164167
#endif

0 commit comments

Comments
 (0)