]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Fix route refcount on pmtu discovery
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 22 Jan 2013 00:01:28 +0000 (00:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jan 2013 19:23:17 +0000 (14:23 -0500)
commite0d8abf26c4d1320f08f6ce048de55ebe87b1924
treef5c9450d05411d8d76c97ac96d9d91243c1ea5bd
parentdc3548c9c1e3052eaf3beeeaeaa28a9341df425f
ipv4: Fix route refcount on pmtu discovery

git commit 4f142f3d (ipv4: Invalidate the socket cached route on
pmtu events if possible) introduced a refcount problem. We don't
get a refcount on the route if we get it from__sk_dst_get(), but
we need one if we want to reuse this route because __sk_dst_set()
releases the refcount of the old route. This patch adds proper
refcount handling for that case. We introduce a 'new' flag to
indicate that we are going to use a new route and we release the
old route only if we replace it by a new one.

Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c