Skip to content

Commit

Permalink
udp: Fix inverted NAPI_GRO_CB(skb)->flush test
Browse files Browse the repository at this point in the history
Commit 2abb7cd ("udp: Add support for doing checksum unnecessary
conversion") caused napi_gro_cb structs with the "flush" field zero to
take the "udp_gro_receive" path rather than the "set flush to 1" path
that they would previously take.  As a result I saw booting from an NFS
root hang shortly after starting userspace, with "server not
responding" messages.

This change to the handling of "flush == 0" packets appears to be
incidental to the goal of adding new code in the case where
skb_gro_checksum_validate_zero_check() returns zero.  Based on that and
the fact that it breaks things, I'm assuming that it is unintentional.

Fixes: 2abb7cd ("udp: Add support for doing checksum unnecessary conversion")
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Wood authored and David S. Miller committed Sep 12, 2014
1 parent c530672 commit 2d8f7e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/udp_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static struct sk_buff **udp4_gro_receive(struct sk_buff **head,
goto flush;

/* Don't bother verifying checksum if we're going to flush anyway. */
if (!NAPI_GRO_CB(skb)->flush)
if (NAPI_GRO_CB(skb)->flush)
goto skip;

if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/udp_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static struct sk_buff **udp6_gro_receive(struct sk_buff **head,
goto flush;

/* Don't bother verifying checksum if we're going to flush anyway. */
if (!NAPI_GRO_CB(skb)->flush)
if (NAPI_GRO_CB(skb)->flush)
goto skip;

if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check,
Expand Down

0 comments on commit 2d8f7e2

Please sign in to comment.