Commit 75d70d7
ipmi: fix initialization when workqueue allocation fails
If the workqueue allocation fails, the driver is marked as not initialized,
and timer and panic_notifier will be left registered.
Instead of removing those when workqueue allocation fails, do the workqueue
initialization before doing it, and cleanup srcu_struct if it fails.
Fixes: 1d49eb9 ("ipmi: Move remove_work to dedicated workqueue")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Cc: Corey Minyard <cminyard@mvista.com>
Cc: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com>
Cc: stable@vger.kernel.org
Message-Id: <20211217154410.1228673-2-cascardo@canonical.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>1 parent 2b5160b commit 75d70d7
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5396 | 5396 | | |
5397 | 5397 | | |
5398 | 5398 | | |
5399 | | - | |
5400 | | - | |
5401 | | - | |
5402 | | - | |
5403 | | - | |
5404 | 5399 | | |
5405 | 5400 | | |
5406 | 5401 | | |
5407 | 5402 | | |
5408 | | - | |
| 5403 | + | |
5409 | 5404 | | |
5410 | 5405 | | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
5411 | 5411 | | |
5412 | 5412 | | |
| 5413 | + | |
| 5414 | + | |
| 5415 | + | |
5413 | 5416 | | |
5414 | 5417 | | |
5415 | 5418 | | |
| |||
0 commit comments