[net RFC v1 0/1] Fix NULL pointer dereference in page_pool

From: Colin Foster
Date: Fri Jan 21 2022 - 19:57:22 EST


I'm not sure if there's something wrong with my config, but as soon as I
run "ip link set eth0 up" I would get a crash that would invoke a
seemingly endless memory dump.

git bisect led me to the page_pool, where there isn't the existence of
page_pool_params inside of the pool. Therefore the check of
if (pool->p.init_callback) would cause a crash.

I have some out-of-tree patches currently, so I'm not sure if my case is
valid. Specifically the MTU of cpsw_new has been updated to 1520 to
account for my setup (beaglebone with eth0 as the CPU port of a DSA).
I'm also not familiar with much of net/core.

If it is valid that page_pool might not have page_pool_params in a DSA
scenario, then hopefully this patch is sufficient. If it isn't valid and
something I'm doing is invoking a memory issue - then I've got my work
cut out for me :-)


Colin Foster (1):
page_pool: fix NULL dereference crash

net/core/page_pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.25.1