summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-05-24 13:29:50 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-03 09:31:58 +0900
commit88bb492456d6ba8c860060d08fc1370a8ce979b0 (patch)
tree89061bf07a8dd4883a7622a2e8068fa9a0aef841 /net
parent9df49f2bfe862573911a080c75a6d81113c5c81d (diff)
net: fix __dst_destroy_metrics_generic()
[ Upstream commit b30c516f875004f025f4d10147bde28c5e98466b ] dst_default_metrics is readonly, we dont want to kfree() it later. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/core/dst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 91104d35de7d..b71b7a30fd73 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -314,7 +314,7 @@ void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old)
{
unsigned long prev, new;
- new = (unsigned long) dst_default_metrics;
+ new = ((unsigned long) dst_default_metrics) | DST_METRICS_READ_ONLY;
prev = cmpxchg(&dst->_metrics, old, new);
if (prev == old)
kfree(__DST_METRICS_PTR(old));