]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bnxt_en: Fix "uninitialized variable" bug in TPA code path.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 18 Jan 2017 03:07:19 +0000 (22:07 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jan 2017 22:01:47 +0000 (17:01 -0500)
In the TPA GRO code path, initialize the tcp_opt_len variable to 0 so
that it will be correct for packets without TCP timestamps.  The bug
caused the SKB fields to be incorrectly set up for packets without
TCP timestamps, leading to these packets being rejected by the stack.

Reported-by: Andy Gospodarek <andrew.gospodarek@broadocm.com>
Acked-by: Andy Gospodarek <andrew.gospodarek@broadocm.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 9608cb49a11ca3d40c9d497bad10bf94d42433ad..53e686fdf2ce18651970a74fbe60f4f1a2a03374 100644 (file)
@@ -1099,7 +1099,7 @@ static struct sk_buff *bnxt_gro_func_5730x(struct bnxt_tpa_info *tpa_info,
 {
 #ifdef CONFIG_INET
        struct tcphdr *th;
-       int len, nw_off, tcp_opt_len;
+       int len, nw_off, tcp_opt_len = 0;
 
        if (tcp_ts)
                tcp_opt_len = 12;