mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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: 7e41969350
("fou: Fix null-ptr-deref in GRO.")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20240906102839.202798-1-usama.anjum@collabora.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b3c9e65eb2
commit
4c80022771
@ -336,11 +336,11 @@ static struct sk_buff *gue_gro_receive(struct sock *sk,
|
|||||||
struct gro_remcsum grc;
|
struct gro_remcsum grc;
|
||||||
u8 proto;
|
u8 proto;
|
||||||
|
|
||||||
|
skb_gro_remcsum_init(&grc);
|
||||||
|
|
||||||
if (!fou)
|
if (!fou)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
skb_gro_remcsum_init(&grc);
|
|
||||||
|
|
||||||
off = skb_gro_offset(skb);
|
off = skb_gro_offset(skb);
|
||||||
len = off + sizeof(*guehdr);
|
len = off + sizeof(*guehdr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user