Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9187626pxu; Mon, 28 Dec 2020 08:46:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfpRYgBOSE/51SNSwrCxweSsQ93zR6VD3Qi3WbbJt/er4Z07GV4SJIrk2fijIBFGBB48/r X-Received: by 2002:a05:6402:1b1e:: with SMTP id by30mr42324271edb.75.1609174015627; Mon, 28 Dec 2020 08:46:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609174015; cv=none; d=google.com; s=arc-20160816; b=LFbSauecJe1gQqt/SnU+UsuqUAAywIIqYanussyy06eeo7Ch0GqXeMgC1QXRvQjI4T Rik9e5UOAZlx8eIF3HUG/NtDmHcjfTaQmyWCw2zS49y35lfwprRGk7p676HUULH28ZU4 UlR4M4wZshxMfqH4RpovDs6bOnR5HuRlTv/wQc5Vnovad1g6394hTLdaIfVwL4pH+W/g 66RsZtcbCkxVpueiRvzDCsAamfU9U8TdHuyoFTQnOgky9/W6Mj8kps/VOPlOVL24VJHh /FCIXxi2IuWndhFRsdrH+wu0lA2/6t6Zv8OrjkZn6t2SiogSk+cNVivn49WFOqWCMDre Y11g== 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=GV3uuVxifPsn1E4F2Opth0S3qX5Whmi3WwOjHGVmK0w=; b=jJg6CKbafPfKx2T0HPm2ftrouIsXauiOvGWMOHnWRPBwcJNQACEAz3WOyH9v/cbi/O ZR7vvkyv25HB1/3gciimhkTgWXJBVbwZBKNZyN2cNy1cNRy78ycjEHJakqC2a96FSguL kCoyRRZVH7YK4NiaW+UhawVoiWR7Z22mkGkIVqZ5XI9kPn8uo+gjH5z6iMZ/56IdmBUW CdeIe5ksEIgj+nwohSepSOUBUt5Z5oQ449dGGt8nkmEIClnatpu0q9m+EJ9GddeVuoNX 2l0ypCJi5pTyhM9GS0cvWwDQwkshDmUp8YnG5tn9eYkux53mkJvo7T5AV0qXcVeiLmVt tVGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZyojWe2k; 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 ca10si19536876edb.435.2020.12.28.08.46.33; Mon, 28 Dec 2020 08:46:55 -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=ZyojWe2k; 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 S2634454AbgL1QnA (ORCPT + 99 others); Mon, 28 Dec 2020 11:43:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:55560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729299AbgL1M7Q (ORCPT ); Mon, 28 Dec 2020 07:59:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A85122B2A; Mon, 28 Dec 2020 12:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160316; bh=F+YAm5F8ehhJEr6UPnNkkXN2owInqTsH48L2UHh36XI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZyojWe2klI5Do37uPIulN7kqrTIaq5yyTtWzINLEmYqL0URYKmz5qhK5nGigeuhKH G//fBCa9czpdny9QI/9AK4c6Mtgc1sK4J/jzmcjsC492nk/Ht28Zzlws/ehkIhfgtK NnzQLz1G/tp16eTDixTHPdU91Z+H6As9bxgTHg8U= 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.9 010/175] scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()" Date: Mon, 28 Dec 2020 13:47:43 +0100 Message-Id: <20201228124853.751432261@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 @@ -3052,7 +3052,6 @@ static int beiscsi_create_eqs(struct bei if (!eq_vaddress) 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); @@ -3062,6 +3061,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) { @@ -3116,7 +3116,6 @@ static int beiscsi_create_cqs(struct bei if (!cq_vaddress) 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) { @@ -3126,6 +3125,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) {