Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp863073pxb; Tue, 1 Feb 2022 12:01:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAsggcMnX8529umA/RLwbcvWtiLxt/680Ficff5JIzN5q6H2uWo+3nP/tAr446VgnKosDy X-Received: by 2002:a05:6402:2681:: with SMTP id w1mr27200017edd.373.1643745680854; Tue, 01 Feb 2022 12:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643745680; cv=none; d=google.com; s=arc-20160816; b=QtUCMX/hj656ay4hp01rZii03sZPXKFPqoEI/mXutCVJ67MzYDUMJ8wTt5VtkXGB4X c4X3g8MeECMuasx58nccufpzm22QqkULkWtV+WsfN4UHO5uhWyQxWQ818+r/R7FuEJpu d0zlhTQwPFIWjbagpe6Er5PSmWAaUPJGoJAZxpwaJjzJXKmTxVZd8DoPHw9il2/9dTZQ hs0s3BHqhH8aP7ZKerqXcZeJWBw/RutTFvfBnkAPeQo+HB8tm9rWneve5pPGopP0qw57 GqymfClRj/WsnBSN15skZ+aJ6ozEJnyUv2tNjp4yH/dlkeWaWd+MKa5wFd47hlmT+XBh k/dw== 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=6cePEqZ75DUlqPUOqewwBdJSCVUMET5sDEdgLPnalls=; b=q3YsRJ6MNHVm2kd/UH5jIggOD0eD1lhHpPkre9AUpStwPaqOS1E0XoCZ1bFL/RsMZ4 9Fzha37a3IgWx5+DvBP0YjidVcAnAwiskDYmB7TedmSOq2OeuX6ilhaBwuZnMt47xYmd GoAtiOr1VvShtkOBcLhGoKoKFKX6D3gt3DJpFmUJ2ohcPbyMERGYGuunMupC/Edyo1ma AIZU3gYchwbHSsHxXF5m6uMMB5HRXmDVuNzI3DG58QfKUdfHY5fTiZBRkDiHEk+JUPPp 5E1ayPHrFAq/+is/SLUio3WIdhGou7urhX5FmVJYriWMpFch5WMIU5CtOab098MQ4URo AX9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KtMV0NNf; 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 r4si9981993edy.369.2022.02.01.12.00.54; Tue, 01 Feb 2022 12:01:20 -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=KtMV0NNf; 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 S1349381AbiAaLKl (ORCPT + 99 others); Mon, 31 Jan 2022 06:10:41 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:40236 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359535AbiAaLFs (ORCPT ); Mon, 31 Jan 2022 06:05:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3EA7660FF5; Mon, 31 Jan 2022 11:05:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B9BBC340EE; Mon, 31 Jan 2022 11:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643627147; bh=AIh8bcIWrRf1bu2DJjMdLk+QgJB8K2W75FM7fvF8Zj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KtMV0NNfsi02efq8tCV93eF3UeiiFsDVw6ieEkd+ziwXHZykKw0vRhyaUsE53c7Uq a9qRsd45FN7gYB/j0+WIdL3GPYfroGKJTGgGbJuA4qLtc7bwhHRF/gdr2UH3I45fjH QHl15BROkVq5sZFfpbopa9lx4cn5g8UXrfWrvGeo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Foster , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Jesper Dangaard Brouer , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 089/100] net: cpsw: Properly initialise struct page_pool_params Date: Mon, 31 Jan 2022 11:56:50 +0100 Message-Id: <20220131105223.452077670@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105220.424085452@linuxfoundation.org> References: <20220131105220.424085452@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: Toke Høiland-Jørgensen [ Upstream commit c63003e3d99761afb280add3b30de1cf30fa522b ] The cpsw driver didn't properly initialise the struct page_pool_params before calling page_pool_create(), which leads to crashes after the struct has been expanded with new parameters. The second Fixes tag below is where the buggy code was introduced, but because the code was moved around this patch will only apply on top of the commit in the first Fixes tag. Fixes: c5013ac1dd0e ("net: ethernet: ti: cpsw: move set of common functions in cpsw_priv") Fixes: 9ed4050c0d75 ("net: ethernet: ti: cpsw: add XDP support") Reported-by: Colin Foster Signed-off-by: Toke Høiland-Jørgensen Tested-by: Colin Foster Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c index 424e644724e46..e74f2e95a46eb 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.c +++ b/drivers/net/ethernet/ti/cpsw_priv.c @@ -1144,7 +1144,7 @@ int cpsw_fill_rx_channels(struct cpsw_priv *priv) static struct page_pool *cpsw_create_page_pool(struct cpsw_common *cpsw, int size) { - struct page_pool_params pp_params; + struct page_pool_params pp_params = {}; struct page_pool *pool; pp_params.order = 0; -- 2.34.1