]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: page_pool: silence static analysis warnings in page_pool_nl_stats_fill()
authorZhao Dongdong <zhaodongdong@kylinos.cn>
Tue, 26 May 2026 06:51:56 +0000 (14:51 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 May 2026 00:37:50 +0000 (17:37 -0700)
commit36d0d876c45f7ee7935edfce7f5687a2969a2249
tree32f1f83948295f7ea46e94418dfb09e56dfb00a6
parent3cefa8d5e798c4e21a7ea48bf6370247fca3aa9d
net: page_pool: silence static analysis warnings in page_pool_nl_stats_fill()

nla_nest_start() can return NULL if the skb runs out of space.

Jakub:
There is no bug here, if nla_nest_start() failed there's not space
left in the message. Next nla_put_uint() will also fail and we will
exit via nla_nest_cancel() which handles NULL just fine.
Various people keep sending us this patch so let's commit this.

Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/tencent_A82EBAB365A8B888B66FDCF115A3DCB8880A@qq.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/page_pool_user.c