]> git.baikalelectronics.ru Git - kernel.git/commit
ipmi: bail out if init_srcu_struct fails
authorThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 17 Dec 2021 15:44:09 +0000 (12:44 -0300)
committerCorey Minyard <cminyard@mvista.com>
Fri, 17 Dec 2021 20:39:03 +0000 (14:39 -0600)
commit0bea54d9c6d1afa0ae5954ec07bc6a3d7999afa5
tree6103b60f89dba224e5ed395098460c82bb8d98c0
parent9bb62243fa25824c4b8484fad9eb917a46edc9d8
ipmi: bail out if init_srcu_struct fails

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: 26c298fc6e7d ("ipmi: Don't initialize anything in the core until something uses it")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Cc: Corey Minyard <cminyard@mvista.com>
Cc: stable@vger.kernel.org
Message-Id: <20211217154410.1228673-1-cascardo@canonical.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c