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: v4.1.12-92~150^2~56 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=17b49a6e3c098d3b616dbe504afc62ac3e6f6e72;p=users%2Fjedix%2Flinux-maple.git be2iscsi: set the boot_kset pointer to NULL in case of failure Orabug: 23331102 [ Upstream commit 84bd64993f916bcf86270c67686ecf4cea7b8933 ] 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. Cc: Signed-off-by: Maurizio Lombardi Reviewed-by: Johannes Thumshirn Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin (cherry picked from commit d5226186331401679a52df554a9607022e470983) Signed-off-by: Dan Duval --- diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 1f74760ce86cb..77a1598bc78df 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4434,6 +4434,7 @@ put_shost: scsi_host_put(phba->shost); free_kset: iscsi_boot_destroy_kset(phba->boot_kset); + phba->boot_kset = NULL; return -ENOMEM; }