From: Dmitry Torokhov Date: Thu, 11 Jun 2026 01:28:33 +0000 (-0700) Subject: Input: rmi4 - initialize attn_fifo properly X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e752b35b65228a948fc9e7dea51abb70da8b114;p=thirdparty%2Flinux.git Input: rmi4 - initialize attn_fifo properly attn_fifo is allocated as part of struct rmi_driver_data using devm_kzalloc in rmi_driver_probe. However, it is never initialized. A zero-initialized kfifo has its mask set to 0, which effectively limits its capacity to 1 element instead of the declared 16. This can lead to lost attention data and memory leaks of the attention data payload if multiple attention events are received before the threaded interrupt handler can process them. Initialize attn_fifo using INIT_KFIFO after allocating rmi_driver_data. Reported-by: sashiko-bot@kernel.org Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index 75949fb1a922..0a21f6fa3195 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -1161,6 +1161,7 @@ static int rmi_driver_probe(struct device *dev) return -ENOMEM; INIT_LIST_HEAD(&data->function_list); + INIT_KFIFO(data->attn_fifo); data->rmi_dev = rmi_dev; dev_set_drvdata(&rmi_dev->dev, data);