Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: exc3000 - properly stop timer on shutdown

We need to stop the timer on driver unbind or probe failures, otherwise
we get UAF/Oops.

Fixes: 7e577a17f2ee ("Input: add I2C attached EETI EXC3000 multi touch driver")
Reported-by: "Stahl, Michael" <mstahl@moba.de>
Link: https://lore.kernel.org/r/Y9dK57BFqtlf8NmN@google.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+10
+10
drivers/input/touchscreen/exc3000.c
··· 109 109 mod_timer(&data->timer, jiffies + msecs_to_jiffies(EXC3000_TIMEOUT_MS)); 110 110 } 111 111 112 + static void exc3000_shutdown_timer(void *timer) 113 + { 114 + timer_shutdown_sync(timer); 115 + } 116 + 112 117 static int exc3000_read_frame(struct exc3000_data *data, u8 *buf) 113 118 { 114 119 struct i2c_client *client = data->client; ··· 388 383 return error; 389 384 390 385 error = input_register_device(input); 386 + if (error) 387 + return error; 388 + 389 + error = devm_add_action_or_reset(&client->dev, exc3000_shutdown_timer, 390 + &data->timer); 391 391 if (error) 392 392 return error; 393 393