提交 fdf3294a 编写于 作者: T Toke Høiland-Jørgensen 提交者: Zheng Zengkai

net: cpsw: Properly initialise struct page_pool_params

stable inclusion
from stable-v5.10.96
commit c9c81b393c745c9b05e4b913818c87d993485605
bugzilla: https://gitee.com/openeuler/kernel/issues/I55NWB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c9c81b393c745c9b05e4b913818c87d993485605

--------------------------------

[ Upstream commit c63003e3 ]

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: c5013ac1 ("net: ethernet: ti: cpsw: move set of common functions in cpsw_priv")
Fixes: 9ed4050c ("net: ethernet: ti: cpsw: add XDP support")
Reported-by: NColin Foster <colin.foster@in-advantage.com>
Signed-off-by: NToke Høiland-Jørgensen <toke@redhat.com>
Tested-by: NColin Foster <colin.foster@in-advantage.com>
Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c16ce997
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册