bridge: fix a possible use after free
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 23 Aug 2011 19:57:05 +0000 (19:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Aug 2011 00:49:24 +0000 (17:49 -0700)
commit22df13319d1fec30b8f9bcaadc295829647109bb
treeb61441ea39ac3c525746bfe8aaab9b6b5f9c6c63
parent4b275d7efa1c4412f0d572fcd7f78ed0919370b3
bridge: fix a possible use after free

br_multicast_ipv6_rcv() can call pskb_trim_rcsum() and therefore skb
head can be reallocated.

Cache icmp6_type field instead of dereferencing twice the struct
icmp6hdr pointer.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c