Commit ad81d666 authored by Chenyuan Yang's avatar Chenyuan Yang Committed by Greg Kroah-Hartman
Browse files

net: libwx: handle page_pool_dev_alloc_pages error



[ Upstream commit 7f1ff1b3 ]

page_pool_dev_alloc_pages could return NULL. There was a WARN_ON(!page)
but it would still proceed to use the NULL pointer and then crash.

This is similar to commit 001ba090
("net: fec: handle page_pool_dev_alloc_pages error").

This is found by our static analysis tool KNighter.

Signed-off-by: default avatarChenyuan Yang <chenyuan0y@gmail.com>
Fixes: 3c47e8ae ("net: libwx: Support to receive packets in NAPI")
Reviewed-by: default avatarJoe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20250407184952.2111299-1-chenyuan0y@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c81306c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment