Skip to content

RFC Fix NULL pointer dereference in page_pool

Colin Foster lkml netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1page_pool: fix NULL dereference crashnet/core/page_pool.c+1 -17 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.25.1