[PATCH 10/10] Input: wacom_w8001 - use reinit_completion() in w8001_command()
From: Lee Jones
Date: Mon Nov 23 2026 - 13:33:25 EST
w8001->cmd_done is already initialised in w8001_connect() before opening
the serio port, yet w8001_command() calls init_completion() again for
each command.
Calling init_completion() on an active completion reinitialises its
internal waitqueue spinlock, triggering lockdep warnings and racing with
complete() in w8001_interrupt() if a late response to a previously
timed-out command arrives concurrently.
Use reinit_completion() in w8001_command() instead.
Fixes: 3eb1aa43ef5c ("Input: add support for Wacom W8001 penabled serial touchscreen")
Closes: https://sashiko.dev/#/bug/linux-002efaac-c345-4827-8f1c-7b9d9226c713
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
---
drivers/input/touchscreen/wacom_w8001.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index d8d1cdc3f09e..a85ef93bdd29 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -362,7 +362,7 @@ static int w8001_command(struct w8001 *w8001, unsigned char command,
int rc;
w8001->response_type = 0;
- init_completion(&w8001->cmd_done);
+ reinit_completion(&w8001->cmd_done);
rc = serio_write(w8001->serio, command);
if (rc == 0 && wait_response) {
--
2.56.1.750.gf70dc682cf-goog