lkml.org 
[lkml]   [2024]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] possible deadlock in input_event (2)
Date
please test deadlock in input_event

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

---
drivers/input/evdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 51e0c4954600..181c798b232b 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -258,7 +258,7 @@ static void evdev_pass_values(struct evdev_client *client,
event.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;

/* Interrupts are disabled, just acquire the lock. */
- spin_lock(&client->buffer_lock);
+ spin_lock_irq(&client->buffer_lock);

for (v = vals; v != vals + count; v++) {
if (__evdev_is_filtered(client, v->type, v->code))
@@ -278,7 +278,7 @@ static void evdev_pass_values(struct evdev_client *client,
__pass_event(client, &event);
}

- spin_unlock(&client->buffer_lock);
+ spin_unlock_irq(&client->buffer_lock);

if (wakeup)
wake_up_interruptible_poll(&client->wait,
--
2.34.1
\
 
 \ /
  Last update: 2024-04-20 08:15    [W:0.067 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site