Skip to content

Commit

Permalink
net: cpsw: Properly initialise struct page_pool_params
Browse files Browse the repository at this point in the history
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: c5013ac ("net: ethernet: ti: cpsw: move set of common functions in cpsw_priv")
Fixes: 9ed4050 ("net: ethernet: ti: cpsw: add XDP support")
Reported-by: Colin Foster <[email protected]>
Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Tested-by: Colin Foster <[email protected]>
Acked-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tohojo authored and davem330 committed Jan 25, 2022
1 parent 29eb315 commit c63003e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ti/cpsw_priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,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;
Expand Down

0 comments on commit c63003e

Please sign in to comment.