From: Maurizio Lombardi Date: Fri, 4 Mar 2016 09:41:49 +0000 (+0100) Subject: be2iscsi: set the boot_kset pointer to NULL in case of failure X-Git-Tag: firefly_0821_release~176^2~4^2~50^2~166 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e760edfb7ba763e48b870025ab0b5edb4af85089;p=firefly-linux-kernel-4.4.55.git be2iscsi: set the boot_kset pointer to NULL in case of failure commit 84bd64993f916bcf86270c67686ecf4cea7b8933 upstream. In beiscsi_setup_boot_info(), the boot_kset pointer should be set to NULL in case of failure otherwise an invalid pointer dereference may occur later. Signed-off-by: Maurizio Lombardi Reviewed-by: Johannes Thumshirn Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index fe0c5143f8e6..758f76e88704 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4470,6 +4470,7 @@ put_shost: scsi_host_put(phba->shost); free_kset: iscsi_boot_destroy_kset(phba->boot_kset); + phba->boot_kset = NULL; return -ENOMEM; }