Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp879812pxk; Thu, 17 Sep 2020 20:10:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbqSlBjzN35fpJgQJ4mvcwGBAQ2vk5VcHSDaB82tmi9TEq8PpuKJqAc1R6mpNlgqTCjwn5 X-Received: by 2002:a50:9dc8:: with SMTP id l8mr36531447edk.58.1600398615727; Thu, 17 Sep 2020 20:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398615; cv=none; d=google.com; s=arc-20160816; b=ZSNt6aTL1p3axNY/Pct6jvoM2K4k9QX2RhLJPxZ7YQvAl3kjLR80Eyq1ZTKvfr370I r+3ebuAjcmgiqyhf8pYVJIzNLuh2mIgweSK0nZTGHOKwAnlmIWsU1imWJ96Nrl9fuRrl bn1Hc0k6mLMVmFebSsfrzEJe+S3LB0T41xQ4txmClVuc+r1++jdqSJNFYy+HkE9egoFc H40NypD6SloPg/utMcppSXs9+f0K6A8nLdFdLgXvbV299egsxefS6oU8D6GEP90uuOAs TUrdenah/eVu1+TTErI6Sahwa44p+Om0NbrrBfIvP2Ww89IL+mGUGXFd0F6dzCUAJnC6 kghw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=whg5WD73w55+PYr4DML1js5pzYVoWLjcA+qXu0pJ45U=; b=w/ZUCvvNuLjyLLvBFU53cjBzW0Hbng/Ztj48MGMBnC2nZTZ9K0Yj0bx2i4roucMSfx mVACJkigTvwA3ca1AsUmB/mwfmFkoHDJfIcQ/cEuY2h3QEc4olPp1YXFDt5BfY5Dg32V gNOEQprPO5WpZ9RHNrtSjLCkSaIEK3f+nQSWa8r3OjDr3mR0LIjw0xMeOkd5O1KHMyh5 f5TmyS6LQ7jhiLZrxHFSlONmZS9hGDTCo7urBUXBOnEWWQxUeb/Ic2y4Xw/xbJsc6S7g VStaUcU539U1PEWvev5OK5/XwtOFhihujrfp4YFdsCjqxKfV/zdj+8I0usUtKbDAV2nw RP7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Akrq5vxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1212479ejr.182.2020.09.17.20.09.52; Thu, 17 Sep 2020 20:10:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Akrq5vxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729995AbgIRDHl (ORCPT + 99 others); Thu, 17 Sep 2020 23:07:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:50232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgIRCDm (ORCPT ); Thu, 17 Sep 2020 22:03:42 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8300235F7; Fri, 18 Sep 2020 02:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394621; bh=T3ieBczVoOGtJ8Z+Ukuh2lyvCRGchjx8Grvfc97QzAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Akrq5vxDNAJkZaRGPZQfuQv4uZMLQOrralQW1Klx+ty9vCP/R5JwSRh3m5m15fdeg JpuN0BDsW9SNR4AZmaZn0NYE+ooixMdkqfDaxP3U9hkEZ+b6DuHUD9UX7pZxzz5/Yx hR2r8xYZKNRsgzJEf1jZ6Bmgo8nYkeWoZHtz+vj4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: James Smart , Dick Kennedy , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 123/330] scsi: lpfc: Fix release of hwq to clear the eq relationship Date: Thu, 17 Sep 2020 21:57:43 -0400 Message-Id: <20200918020110.2063155-123-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit 821bc882accaaaf1bbecf5c0ecef659443e3e8cb ] When performing reset testing, the eq's list for related hwqs was getting corrupted. In cases where there is not a 1:1 eq to hwq, the eq is shared. The eq maintains a list of hwqs utilizing it in case of cpu offlining and polling. During the reset, the hwqs are being torn down so they can be recreated. The recreation was getting confused by seeing a non-null eq assignment on the eq and the eq list became corrupt. Correct by clearing the hdwq eq assignment when the hwq is cleaned up. Link: https://lore.kernel.org/r/20200128002312.16346-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 95abffd9ad100..d4c83eca0ad2c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -9124,6 +9124,7 @@ lpfc_sli4_release_hdwq(struct lpfc_hba *phba) /* Free the CQ/WQ corresponding to the Hardware Queue */ lpfc_sli4_queue_free(hdwq[idx].io_cq); lpfc_sli4_queue_free(hdwq[idx].io_wq); + hdwq[idx].hba_eq = NULL; hdwq[idx].io_cq = NULL; hdwq[idx].io_wq = NULL; if (phba->cfg_xpsgl && !phba->nvmet_support) -- 2.25.1