Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933447AbcDKNt2 (ORCPT ); Mon, 11 Apr 2016 09:49:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:37397 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932414AbcDKNYB (ORCPT ); Mon, 11 Apr 2016 09:24:01 -0400 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Maurizio Lombardi , "Martin K . Petersen" , Jiri Slaby Subject: [PATCH 3.12 44/98] be2iscsi: set the boot_kset pointer to NULL in case of failure Date: Mon, 11 Apr 2016 15:22:46 +0200 Message-Id: X-Mailer: git-send-email 2.8.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 35 From: Maurizio Lombardi 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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: Jiri Slaby --- drivers/scsi/be2iscsi/be_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 86dcc5c10659..8eeb24272154 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4040,6 +4040,7 @@ put_shost: scsi_host_put(phba->shost); free_kset: iscsi_boot_destroy_kset(phba->boot_kset); + phba->boot_kset = NULL; return -ENOMEM; } -- 2.8.1