]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 21:35:27 +0000 (13:35 -0800)
Orabug: 25645429

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>
(cherry picked from commit 719ca8111402aa6157bd83a3c966d184db0d8956)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 02adb32b095752b52fdd2acfe8b289691578e561..9a273dd77a4aa70f062d181b613bd71df661ee3f 100644 (file)
@@ -1100,7 +1100,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;