Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4875929pjb; Mon, 27 Jul 2020 07:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySe1WR0Txqo1gT63TxT3QMC91BtQ0taTPHFy2sOHADifxHmNTPjUiscSlm0ZPnFC82GvuQ X-Received: by 2002:a05:6402:d06:: with SMTP id eb6mr20915925edb.211.1595859758616; Mon, 27 Jul 2020 07:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859758; cv=none; d=google.com; s=arc-20160816; b=HZoSvUj0gy2srpGLgiLvTGhV/1PdBOQXhGTHDmCky0c4V/ChaAAyr/UVOwj3Ma1IX7 FSHdLktT4zgKaNd15oo+JfXADnAefPdt5nn8EBXgXlrdBqlTe55aix+iKd7GZuZcI4Ow h/PzmD12ofw1IhgLGK5Vy8I2ICNMF6jxGxQQKHMW9M62EegJmhhwm3sgrFWip6DktDMG 5jn0+jnlfHvUs7x/jeadhlo3Y3t0tAkOcuuz+R2z6UCzcyhlwbhzl231TxnktKEEFg2m fahgJOphMZyelxlJ7JvH2wPI3QDwJ8tlCFQAwRh5aQWwqJXXrjX57brinnuc6XbqYgXO NKvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=awGYQcjvBxA+7/ot5WYQqIHf6n/swwDMRD8DT32+tZ4=; b=Fqi54+q1WiF60ys0naMZHrYYlTGZa4VRnjHB4s2haQF/uHsH6xoF6W0qJJyMJEMnpr oocRoIlFIIaCSzoPke7yUGOTpgl1DRE4/mBYBbB5GHqXc5RobnvFbI/sagnj2CvTPdQx Fm8dRvK1tB5PZAjAgoj+1mKfd6DMvJO3jGse8OkpCUpr9Nql6n1LGImimEHFIYQfcNq1 FjgevB8XEYQv6VfIjcpffauPBB2g0hpgTl/GJqngOugK7D8qEQYaaspOUTFSv9ZNFKVq dDxObYlBXWntEXlhIM7WGkS0+xS4bLoCgDDLNhIkW2kkMu3N4X5mHo8Cjjd3U35Xpcto H6UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B4KEfb+M; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o26si5656639edq.32.2020.07.27.07.22.15; Mon, 27 Jul 2020 07:22:38 -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=B4KEfb+M; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731615AbgG0OUv (ORCPT + 99 others); Mon, 27 Jul 2020 10:20:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:49080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731042AbgG0OUn (ORCPT ); Mon, 27 Jul 2020 10:20:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 DFFEE20775; Mon, 27 Jul 2020 14:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859643; bh=8uOWQna+xF+wALsfQe81pslny6LeDhpRhdbY+HKlN6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4KEfb+MhD/+8dIa9zdT8MCzj8fgcwDm7g86oHthV824sVY9elcIezQW2xXSVbFAH LRFBr+kFCIUQUog9YSYp48Q/RV2siNq0G0DkvHgsgJiaRU0kK/dMEO57w/sa1SCKyA fv2zBwIV5eTMNuMzLjdCVg0Z6WMShidsy6aCjwGg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 048/179] hippi: Fix a size used in a pci_free_consistent() in an error handling path Date: Mon, 27 Jul 2020 16:03:43 +0200 Message-Id: <20200727134935.008020495@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 3195c4706b00106aa82c73acd28340fa8fc2bfc1 ] The size used when calling 'pci_alloc_consistent()' and 'pci_free_consistent()' should match. Fix it and have it consistent with the corresponding call in 'rr_close()'. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/hippi/rrunner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index 2a6ec53949666..a4b3fce69ecd9 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c @@ -1242,7 +1242,7 @@ static int rr_open(struct net_device *dev) rrpriv->info = NULL; } if (rrpriv->rx_ctrl) { - pci_free_consistent(pdev, sizeof(struct ring_ctrl), + pci_free_consistent(pdev, 256 * sizeof(struct ring_ctrl), rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma); rrpriv->rx_ctrl = NULL; } -- 2.25.1