]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipmi: Fix NULL pointer access and double free panic.
authorAtish Patra <atish.patra@oracle.com>
Tue, 20 Sep 2016 19:13:33 +0000 (12:13 -0700)
committerAllen Pais <allen.pais@oracle.com>
Tue, 8 Nov 2016 10:07:42 +0000 (15:37 +0530)
commit8eada9266a3f0aaeba044a7e1af8cd5822fcc637
tree0e1db546d758e33c386bf165a5f3fdb4238e9402
parentb7bff9143a788e7f6faab1010da0180e59d3b313
ipmi: Fix NULL pointer access and double free panic.

Orabug: 24697944

In case of a ldom/hardware not supporting ldc, ipmi_si module
will set the smi interface pointer to NULL after ldc channel
detection failure. However, ipmi_si module will crash during
unload due to absence of NULL check.

Add the smi interface null check and assign the workqueue to
NULL during cleanup to avoid double free panic.

Signed-off-by: Atish Patra <atish.patra@oracle.com>
Reviewed-by: David Aldridge <david.j.aldridge@oracle.com>
Reviewed-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
(cherry picked from commit f2546771efb0c6402a5ea65dac9c5dbce18150e6)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/char/ipmi/ipmi_vldc_sm.c