Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751515AbcDJTiq (ORCPT ); Sun, 10 Apr 2016 15:38:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54712 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932336AbcDJTTI (ORCPT ); Sun, 10 Apr 2016 15:19:08 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maurizio Lombardi , Johannes Thumshirn , Jitendra Bhivare , "Martin K. Petersen" Subject: [PATCH 3.14 12/76] be2iscsi: set the boot_kset pointer to NULL in case of failure Date: Sun, 10 Apr 2016 11:36:20 -0700 Message-Id: <20160410183516.530032710@linuxfoundation.org> X-Mailer: git-send-email 2.8.0 In-Reply-To: <20160410183516.090999097@linuxfoundation.org> References: <20160410183516.090999097@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 977 Lines: 33 3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maurizio Lombardi 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 --- drivers/scsi/be2iscsi/be_main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4432,6 +4432,7 @@ put_shost: scsi_host_put(phba->shost); free_kset: iscsi_boot_destroy_kset(phba->boot_kset); + phba->boot_kset = NULL; return -ENOMEM; }