mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
net: mvpp2: use slab_build_skb for oversized frames
[ Upstream commit4467c09bc7
] Setting frag_size to 0 to indicate kmalloc has been deprecated, use slab_build_skb directly. Fixes:ce098da149
("skbuff: Introduce slab_build_skb()") Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz> Reviewed-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20240613024900.3842238-1-aryan.srivastava@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
25cfe59f44
commit
c70f0a5065
@ -4013,7 +4013,10 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi,
|
||||
}
|
||||
}
|
||||
|
||||
skb = build_skb(data, frag_size);
|
||||
if (frag_size)
|
||||
skb = build_skb(data, frag_size);
|
||||
else
|
||||
skb = slab_build_skb(data);
|
||||
if (!skb) {
|
||||
netdev_warn(port->dev, "skb build failed\n");
|
||||
goto err_drop_frame;
|
||||
|
Loading…
Reference in New Issue
Block a user