Skip to content

Commit fc54e39

Browse files
committed
Merge tag 'batadv-net-pullrequest-20220508' of git://git.open-mesh.org/linux-merge
Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - Don't skb_split skbuffs with frag_list, by Sven Eckelmann * tag 'batadv-net-pullrequest-20220508' of git://git.open-mesh.org/linux-merge: batman-adv: Don't skb_split skbuffs with frag_list ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 630fd48 + a063f2f commit fc54e39

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

net/batman-adv/fragmentation.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,17 @@ int batadv_frag_send_packet(struct sk_buff *skb,
475475
goto free_skb;
476476
}
477477

478+
/* GRO might have added fragments to the fragment list instead of
479+
* frags[]. But this is not handled by skb_split and must be
480+
* linearized to avoid incorrect length information after all
481+
* batman-adv fragments were created and submitted to the
482+
* hard-interface
483+
*/
484+
if (skb_has_frag_list(skb) && __skb_linearize(skb)) {
485+
ret = -ENOMEM;
486+
goto free_skb;
487+
}
488+
478489
/* Create one header to be copied to all fragments */
479490
frag_header.packet_type = BATADV_UNICAST_FRAG;
480491
frag_header.version = BATADV_COMPAT_VERSION;

0 commit comments

Comments
 (0)