Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9220452pxu; Mon, 28 Dec 2020 09:38:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnmL5wAqmnbQ748e+9hLpET77eM3W7I/z8wRAy4uUxZOXIfNIMvy2i1S7MFL1+bLSW58fj X-Received: by 2002:a05:6402:50cf:: with SMTP id h15mr33672960edb.149.1609177099010; Mon, 28 Dec 2020 09:38:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609177099; cv=none; d=google.com; s=arc-20160816; b=wkF1et4kr7+ws8L4p+36XozMVgEmsmYJRxPZTwBCoj+SUbp3D2khMyM0hHwjMDLwi6 E4rXlTB9HCr5ZXDLoQXtIQvD2hNc0DbQQ8lP8UM5Va5oaRfou7526x0gyBN79ohNaTNy jiirur1tfVA7E6oDJfKKiaDTaaBCQ67AgLEhVWjAAToEA+b5VqWWMmKuNOc2vwlp8/lS wmXgVPtUQcDc0bC5zeAkwqBBBy2Dhd3eGTw+VyqzI7WOJnlroEL01gtOt7VnWrwiJJzA 9HL1kEE/4lT02kBHNkLscN3se9QsI1giIKq2nLAvuZS2Wp08jnxYYPPTXZX+vgPnufpc R4Qg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=10B+fflj9zYqriuBLbFoS8YZoNIedevfMHAPqQS0qh4=; b=LSVRtigG02dNP2vtVR1kytQX3yhW1eXOn7uceOfNLwc89e2Oq6enuAeJsvGJ/z58N1 rjzsWHnZdPGmHx7XsT71QPMeyGYgpesu7nsMPyZNTxEw2RSIw8Sr9cwSMlGTuet6Gqh6 PTPFALodAHKo/aFu6aDQ5pA3pUfgwPD5kMiP9RWbYZ/rst0iYTt7Mc4nAhTbX/RP5esi MNs8DGxDOAd//1ttRbWKqIO7PpuR50IQFx0HIXfuXQ86gH6QSv/k9foyCJ5q6SkjqDL/ p4NqzgtGWhwo9EcRljLMdXMOdBRU2X29KncxI+/+lb7+GyoJ//NpEHvMD/Cq19HM4VWR Uqyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NUzW5WfK; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si18990624ejf.491.2020.12.28.09.37.57; Mon, 28 Dec 2020 09:38:18 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=NUzW5WfK; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731166AbgL1NJk (ORCPT + 99 others); Mon, 28 Dec 2020 08:09:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:37366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731160AbgL1NJg (ORCPT ); Mon, 28 Dec 2020 08:09:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8DFF222582; Mon, 28 Dec 2020 13:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160935; bh=fShka0oswP6q+oPjMziHDeTMWXTj5YhmY3JA6kuv8N8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NUzW5WfKSMtEkFcl6R2PoQFpcotPdtZRjGFhNHiX/8sXpshfpK5XqytJbT5RUQr6a AhoLzjq2xL5xJ7mC0URZVRRa75q1zrms8RSQqUSVFM6ezu6dC4pzbqX29kJG6KUdkq 7JVgK2171oL85Zu7u/nGU6RVXSaxjE/3lUd7NyxY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Lamprecht , Dan Carpenter , "Martin K. Petersen" Subject: [PATCH 4.14 014/242] scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()" Date: Mon, 28 Dec 2020 13:46:59 +0100 Message-Id: <20201228124905.365452340@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit eeaf06af6f87e1dba371fbe42674e6f963220b9c upstream. My patch caused kernel Oopses and delays in boot. Revert it. The problem was that I moved the "mem->dma = paddr;" before the call to be_fill_queue(). But the first thing that the be_fill_queue() function does is memset the whole struct to zero which overwrites the assignment. Link: https://lore.kernel.org/r/X8jXkt6eThjyVP1v@mwanda Fixes: 38b2db564d9a ("scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs()") Cc: stable Reported-by: Thomas Lamprecht Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/be2iscsi/be_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -3013,7 +3013,6 @@ static int beiscsi_create_eqs(struct bei goto create_eq_error; } - mem->dma = paddr; mem->va = eq_vaddress; ret = be_fill_queue(eq, phba->params.num_eq_entries, sizeof(struct be_eq_entry), eq_vaddress); @@ -3023,6 +3022,7 @@ static int beiscsi_create_eqs(struct bei goto create_eq_error; } + mem->dma = paddr; ret = beiscsi_cmd_eq_create(&phba->ctrl, eq, phwi_context->cur_eqd); if (ret) { @@ -3079,7 +3079,6 @@ static int beiscsi_create_cqs(struct bei goto create_cq_error; } - mem->dma = paddr; ret = be_fill_queue(cq, phba->params.num_cq_entries, sizeof(struct sol_cqe), cq_vaddress); if (ret) { @@ -3089,6 +3088,7 @@ static int beiscsi_create_cqs(struct bei goto create_cq_error; } + mem->dma = paddr; ret = beiscsi_cmd_cq_create(&phba->ctrl, cq, eq, false, false, 0); if (ret) {