From: Hannes Frederic Sowa Date: Sun, 29 Sep 2013 03:40:50 +0000 (+0200) Subject: ipv6: gre: correct calculation of max_headroom X-Git-Tag: v3.12-rc4~30^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3da812d860755925da890e8c713f2d2e2d7b1bae;p=pandora-kernel.git ipv6: gre: correct calculation of max_headroom gre_hlen already accounts for sizeof(struct ipv6_hdr) + gre header, so initialize max_headroom to zero. Otherwise the if (encap_limit >= 0) { max_headroom += 8; mtu -= 8; } increments an uninitialized variable before max_headroom was reset. Found with coverity: 728539 Cc: Dmitry Kozlov Signed-off-by: Hannes Frederic Sowa Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed