Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1986680imm; Thu, 24 May 2018 04:04:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGN/QlU/12Swpa+HlzhFbm/7aGm9+QQYNvHJxbXf/pMCkKHqw9Y0qrwtsinO1u+0VXLo7U X-Received: by 2002:a62:6304:: with SMTP id x4-v6mr6799438pfb.94.1527159888463; Thu, 24 May 2018 04:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159888; cv=none; d=google.com; s=arc-20160816; b=GRi7EhoHiQyRNXIZ8L/2ZwMH/OVdE2pUSxzatTl7ovtS5/0XIMEzZlAwARrjp87fLb zSPrTevTqTczNSKl6LeL1SAMYVLcl1dE1O0FANzDoBsUPoWW8QBPs5+A4CUDXlWxT0aN DfW2U8iGts+THZDu3yFWu1p8dfk8NS958FBo76FcYIK1hSnzW98H5FKvE/x5kVxQkANn RM0ecsuG3hXCyDphKmYenge/vTgxk8N2EWld0e+JMjzBmK9bgSzl8U80xJAx4F4Ds9I1 R3QWgmIRKi+xAnL0TRW3U9LtJxuWRWp0KbAFABQLECR0CgjKjJUt/UHbjLgK6Ytqn5KJ DBTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=GAU85ESeGo5wbF7M1rFhEzFKxdz9fM4i3n+DyNwjqV0=; b=BddQ7zFj6O9aF9TjvYut29Em4TGia0k5BSoKfPo4ax7ZTKSyrZGy2uo7PdWWfe28h8 l/2oruQTTYjvN6hcxluRfAxYiq1BDXC2kZL9UYqrdWfNQ68xSVgLFbaQsAWB021eSfOy IbzK9qQlH6ntw4eai7/L/GForsyGI2q/zwTWoZiFT42IslEQVP+J0BJ0U04bWFbs+PKU tddpFwZSCLgK0eGXqCTFDE/untALJFlgzfICvzso9jpiSNBHKQDE+Q4BoiRQF8BH+WF1 zJFUyhAa6LDdJBKqDc3lY3hQqZHrzQ3EMAVvB64MnV757Q/QaIMfASjpDaII7n5XJqZB IuHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rcX+Qi2u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2-v6si21309779pfk.287.2018.05.24.04.04.29; Thu, 24 May 2018 04:04:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rcX+Qi2u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032747AbeEXLDk (ORCPT + 99 others); Thu, 24 May 2018 07:03:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:35778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968396AbeEXJzn (ORCPT ); Thu, 24 May 2018 05:55:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E53520892; Thu, 24 May 2018 09:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155742; bh=FV/Twm9W5iMb56NyE8t3g8ev2rw136MdrtSdQDOGNrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rcX+Qi2u3OYE29EfpsJ+KYz4VWSN19/dVZh/NNpLXP/YpaiihuNwcdFynPgahTIyi XYjXzzTTCdyPqU48VVOo2idvEifMeHOWL4IhbYg6ADZFcA4eyAHa5Nf0CzY8DBvaWS 3JAXW49mQdX7OZRVSlIDJvBHhwyyZZpVPGlBxBnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quinn Tran , Himanshu Madhani , Johannes Thumshirn , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 100/165] scsi: qla2xxx: Fix memory corruption during hba reset test Date: Thu, 24 May 2018 11:38:26 +0200 Message-Id: <20180524093626.059713786@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quinn Tran [ Upstream commit 2ce87cc5b269510de9ca1185ca8a6e10ec78c069 ] This patch fixes memory corrpution while performing HBA Reset test. Following stack trace is seen: [ 466.397219] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 [ 466.433669] IP: [] qlt_free_session_done+0x260/0x5f0 [qla2xxx] [ 466.467731] PGD 0 [ 466.476718] Oops: 0000 [#1] SMP Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_os.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -3581,6 +3581,8 @@ qla2x00_remove_one(struct pci_dev *pdev) } qla2x00_wait_for_hba_ready(base_vha); + qla2x00_wait_for_sess_deletion(base_vha); + /* * if UNLOAD flag is already set, then continue unload, * where it was set first.