This is a note to let you know that I've just added the patch titled ipmi: bail out if init_srcu_struct fails to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ipmi-bail-out-if-init_srcu_struct-fails.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 2b5160b12091285c5aca45980f100a9294af7b04 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> Date: Fri, 17 Dec 2021 12:44:09 -0300 Subject: ipmi: bail out if init_srcu_struct fails From: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> commit 2b5160b12091285c5aca45980f100a9294af7b04 upstream. In case, init_srcu_struct fails (because of memory allocation failure), we might proceed with the driver initialization despite srcu_struct not being entirely initialized. Fixes: 913a89f009d9 ("ipmi: Don't initialize anything in the core until something uses it") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> Cc: Corey Minyard <cminyard@xxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Message-Id: <20211217154410.1228673-1-cascardo@xxxxxxxxxxxxx> Signed-off-by: Corey Minyard <cminyard@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/char/ipmi/ipmi_msghandler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -5148,7 +5148,9 @@ static int ipmi_init_msghandler(void) if (initialized) goto out; - init_srcu_struct(&ipmi_interfaces_srcu); + rv = init_srcu_struct(&ipmi_interfaces_srcu); + if (rv) + goto out; timer_setup(&ipmi_timer, ipmi_timeout, 0); mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); Patches currently in stable-queue which might be from cascardo@xxxxxxxxxxxxx are queue-5.15/ipmi-fix-initialization-when-workqueue-allocation-fails.patch queue-5.15/ipmi-bail-out-if-init_srcu_struct-fails.patch