Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9235669pxu; Mon, 28 Dec 2020 10:03:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR/NDiw2VYw9pOYFeQzvooQ6j8kmU2YSo5De/8vkFQs2xjKHdWDTirRZsOyaRKAyVZ1sEN X-Received: by 2002:a05:6402:158:: with SMTP id s24mr44575294edu.19.1609178623634; Mon, 28 Dec 2020 10:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609178623; cv=none; d=google.com; s=arc-20160816; b=XSJpjfdn1+UgJy/DuX/yzjYB1htpdi0LJLaUlCb64AytSvgX7xyu22osmeP7YEKWU0 xC3yvM6xWRQ+2IV78OSAKZUdYLCRNpvK2Q9Y18w4YntE8qn91z56U7xbN1W0m8iwky4+ /plVNO+xUQKMdLwDLKkLRq/HOkNTIh4P7BpyONpeb8J19XyBn4y4lL3ePO0r+3UviGK9 sgNSNR4CEws7RUcwhjbaviwUjvZddb7HN/A3ADovymYAnDGZ9aTNtmCSCx27Cn3515IC vPKwmu6OFxdfMHUHU62BSgXX7QlBdXIYULHnQR4KaI64a9MCz1BiFyj1p8JNRPjcXN+N BWlg== 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=4yDaHKvD+tppxoTtvg0BqlLzkMLZaxgudKpF4ZY9eeg=; b=NYLCGFIRcHXcBXXyUcGjIvNwvCT0C/QOvOQlw6qtllccJfcQnaao81fal4O1TQXhts +FNdCGHTGB9floFcFG3brVlYlo2KKGfFPrtZzkIdcWi+GOkWjc6s7+r8ohMFRpjHl586 xDxYBMon2Hsrne/7TgT0SGsw20dfoaM/q/HRjdriLWhqmuPSU1mvDOiyyB8UklImNy5w nAIDW4jNmTCSEFNqt5aCQr5y92Y1a6IryNrJEDggyEsZdklSr5rXN9v40M45wWSkzU+a 2wAL2zrTvNvkaYm1+ycVP0n7jnuxeKoCk3Fca/ApMy1Lk4thZ0ezJKgIu/P+sPf8z8bl TdDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y7A7NTr8; 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 gl19si18866919ejb.476.2020.12.28.10.03.20; Mon, 28 Dec 2020 10:03:43 -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=Y7A7NTr8; 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 S2388193AbgL1NV7 (ORCPT + 99 others); Mon, 28 Dec 2020 08:21:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:50348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388184AbgL1NV5 (ORCPT ); Mon, 28 Dec 2020 08:21:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3FE4320719; Mon, 28 Dec 2020 13:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161676; bh=ry6M5yp688WGwiaHQBdcQbu45j94HpT7HrYXdeK19sU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y7A7NTr8M+gQIrGNcGKAsF8WeadnpHKPPzEZu8GEOFlvY9hydeAQaUb4e94AqELp1 Fmzi4MuknmLClOedU1ElT9+UHURIdoX6apoe+9wMlaog7i2JShxjyCYVjY76ThL3R4 +rdW9ktGmirBpiF+PnrLrtCDAgSxBfMA61pgTPLI= 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.19 022/346] scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()" Date: Mon, 28 Dec 2020 13:45:41 +0100 Message-Id: <20201228124920.844258802@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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 @@ -3039,7 +3039,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); @@ -3049,6 +3048,7 @@ static int beiscsi_create_eqs(struct bei goto create_eq_error; } + mem->dma = paddr; ret = beiscsi_cmd_eq_create(&phba->ctrl, eq, BEISCSI_EQ_DELAY_DEF); if (ret) { @@ -3105,7 +3105,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) { @@ -3115,6 +3114,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) {