mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
ipmi: bail out if init_srcu_struct fails
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: 913a89f009 ("ipmi: Don't initialize anything in the core until something uses it")
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Corey Minyard <[email protected]>
Cc: [email protected]
Message-Id: <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
5525d80dc9
commit
cd24bafefc
1 changed files with 3 additions and 1 deletions
|
|
@ -5156,7 +5156,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue