Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

be2iscsi: set the boot_kset pointer to NULL in case of failure

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: <stable@vger.kernel.org>
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Maurizio Lombardi and committed by
Martin K. Petersen
a41b2efb f4327a95

+1
+1
drivers/scsi/be2iscsi/be_main.c
··· 4493 4493 scsi_host_put(phba->shost); 4494 4494 free_kset: 4495 4495 iscsi_boot_destroy_kset(phba->boot_kset); 4496 + phba->boot_kset = NULL; 4496 4497 return -ENOMEM; 4497 4498 } 4498 4499