Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4889307pjb; Mon, 27 Jul 2020 07:40:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwujMWZqtUvlmAfmBRPsJAw4zbz+7Jxl1yizKYwfHIo0LCeBPBcaOYJz7zVJc11eBsWtjdH X-Received: by 2002:a17:906:2799:: with SMTP id j25mr12615895ejc.466.1595860843735; Mon, 27 Jul 2020 07:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860843; cv=none; d=google.com; s=arc-20160816; b=pAj2PxN0qpyCqwGYIVmvW5JFMhvynGVO89cxW/oVRGrxfLqeviQt12rRYKrALy5Sg+ /kovwP+TM/tuCLNMgniC8K6G2SZ81zi97w+He5rGJBSNRXoNwxXio8cyslUVu2HsHiHi 8dgPJxbsGW31EyFMBSpRejRpcSBAv9tFR4k4JJpl5CSX1yXIZf3/rdtxca8NxEQC3pBk 8Q3sTSQAAejUwIfSR2uZjq7JlViIox5CDtEx7o+tyX3vyCxZS4nc19FbRVTKseVJXrce momHSpimDiknp0XPTINL4vvcJvelYR56j08q1f3DKD7gYecZhN+0hOjcHCW1/AovGYky NsmA== 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=d+K9wSs02vBcsdPi2Yr5F/epWM91fLYVX3BsfMqrVOU=; b=N4x1kvqLTfIjlPsBZPATIliQ+5yZ5BzcAg7IPTO/WuMzevjgZ0hid359DEJ9eMYgnh gajm/QGIFCfRGJWk5q8IUeTIhZdlgQJcRI4qmTWQKfVrSzQzRKpXmlBShgoB4kubfg+B k+QF1gEUdx3ODXJYw+d4OBD+O5b4giELU/A4v5Y5Z/xMBazD8fJck0GCub2zSAp6FiMM iaB6rymOFvFmIzXIH/RJfaENHjYHQA5tLg0N9RNDeOvqx+7DPTu+YMydogmiY1CEQl+Y AmKNiiHaSmOWtlekzJUyrWDRAIuv6CBf8XPhlE6CUqzziL53luP94a1oJaIbutGMKumY nYYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uJW9axA9; 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 w11si5873493edq.29.2020.07.27.07.40.21; Mon, 27 Jul 2020 07:40:43 -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=uJW9axA9; 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 S1730771AbgG0OjQ (ORCPT + 99 others); Mon, 27 Jul 2020 10:39:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:60654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729748AbgG0OKA (ORCPT ); Mon, 27 Jul 2020 10:10:00 -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 2F9852083E; Mon, 27 Jul 2020 14:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595858999; bh=JSY/ZG6E/SThjrRqN49pp2TkyzumB4ywJMpDltI+IAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uJW9axA9Ga3x2J66eniy2WIqGb/o4hE0YMAftk4Iu1OQrGz0cSto2aLwD+FhqJDL3 4SlSON38m2BLdmSWjDQNFmd8JyAjeShPVwLBLemm60HK66B/Ftwe2sjEv/FF0XoJMI jvySwhQpuNXuCaDl6hQ9JJs503t3g17/1IWqu3Ds= 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 4.19 27/86] hippi: Fix a size used in a pci_free_consistent() in an error handling path Date: Mon, 27 Jul 2020 16:04:01 +0200 Message-Id: <20200727134915.816999436@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134914.312934924@linuxfoundation.org> References: <20200727134914.312934924@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 029206e4da3b3..2a8c33abb363a 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c @@ -1248,7 +1248,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