Skip to content

Commit

Permalink
ibft: Kernel oops when rmmoding iscsi_ibft with no iBFT present.
Browse files Browse the repository at this point in the history
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" <jayamohank@serverengines.com>  
Tested-by: "Jayamohan Kalickal" <jayamohank@serverengines.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Peter Jones <pjones@redhat.com>
 
  • Loading branch information
konradwilk committed Aug 11, 2010
1 parent 5abd9cc commit a12415f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/firmware/iscsi_ibft.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a12415f

Please sign in to comment.