mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
ibft: Kernel oops when rmmoding iscsi_ibft with no iBFT present.
We failed to check to see if actually allocated structures to contain the iBFT structure and went ahead to dereference it. This patch fixes the OOPS. Reported-by: "Jayamohan Kalickal" <[email protected]> Tested-by: "Jayamohan Kalickal" <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Peter Jones <[email protected]>
This commit is contained in:
parent
5abd9ccced
commit
a12415ff58
1 changed files with 4 additions and 2 deletions
|
|
@ -727,8 +727,10 @@ static void ibft_unregister(void)
|
|||
|
||||
static void ibft_cleanup(void)
|
||||
{
|
||||
ibft_unregister();
|
||||
iscsi_boot_destroy_kset(boot_kset);
|
||||
if (boot_kset) {
|
||||
ibft_unregister();
|
||||
iscsi_boot_destroy_kset(boot_kset);
|
||||
}
|
||||
}
|
||||
|
||||
static void __exit ibft_exit(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue