diff options
author | Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz> | 2024-06-13 14:49:00 +1200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-27 13:52:20 +0200 |
commit | c70f0a5065570ebf3ae735cd1ca43fc47965a2eb (patch) | |
tree | eb5946b9e14f8995b0883fdf2be1ad3ae6ddd4bd | |
parent | 25cfe59f4470a051d1b80f51fa0ca3a5048e4a19 (diff) | |
download | linux-stable-c70f0a5065570ebf3ae735cd1ca43fc47965a2eb.tar.gz linux-stable-c70f0a5065570ebf3ae735cd1ca43fc47965a2eb.tar.bz2 linux-stable-c70f0a5065570ebf3ae735cd1ca43fc47965a2eb.zip |
net: mvpp2: use slab_build_skb for oversized frames
[ Upstream commit 4467c09bc7a66a17ffd84d6262d48279b26106ea ]
Setting frag_size to 0 to indicate kmalloc has been deprecated,
use slab_build_skb directly.
Fixes: ce098da1497c ("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>
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 23adf53c2aa1..cebc79a710ec 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -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; |