Skip to content

Commit 4c80022

Browse files
musamaanjumkuba-moo
authored andcommitted
fou: fix initialization of grc
The grc must be initialize first. There can be a condition where if fou is NULL, goto out will be executed and grc would be used uninitialized. Fixes: 7e41969 ("fou: Fix null-ptr-deref in GRO.") Signed-off-by: Muhammad Usama Anjum <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b3c9e65 commit 4c80022

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/fou_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,11 @@ static struct sk_buff *gue_gro_receive(struct sock *sk,
336336
struct gro_remcsum grc;
337337
u8 proto;
338338

339+
skb_gro_remcsum_init(&grc);
340+
339341
if (!fou)
340342
goto out;
341343

342-
skb_gro_remcsum_init(&grc);
343-
344344
off = skb_gro_offset(skb);
345345
len = off + sizeof(*guehdr);
346346

0 commit comments

Comments
 (0)