]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fix a dst leak in tunnels
authorEric Dumazet <edumazet@google.com>
Fri, 17 Jan 2014 00:41:19 +0000 (16:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jan 2014 02:36:39 +0000 (18:36 -0800)
commitf337c58caebdf6b66fce8c3b6c3cb0ca5bc590dc
tree15e55648f844c0338783711c523008301486c637
parent38804f532eb57a30caffb70d32457b2273f3bd25
ipv4: fix a dst leak in tunnels

This patch :

1) Remove a dst leak if DST_NOCACHE was set on dst
   Fix this by holding a reference only if dst really cached.

2) Remove a lockdep warning in __tunnel_dst_set()
    This was reported by Cong Wang.

3) Remove usage of a spinlock where xchg() is enough

4) Remove some spurious inline keywords.
   Let compiler decide for us.

Fixes: d8a5721b5545 ("ipv4: Cache dst in tunnels")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Cong Wang <cwang@twopensource.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip_tunnels.h
net/ipv4/ip_tunnel.c