diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-05-24 19:29:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-24 19:29:50 +0200 |
commit | b30c516f875004f025f4d10147bde28c5e98466b (patch) | |
tree | 066a6d57ec1cbdf0bfe7219a57bad1459b89773f /net | |
parent | CDC NCM: release interfaces fix in unbind() (diff) | |
download | linux-b30c516f875004f025f4d10147bde28c5e98466b.tar.xz linux-b30c516f875004f025f4d10147bde28c5e98466b.zip |
net: fix __dst_destroy_metrics_generic()
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dst.c b/net/core/dst.c index 81a4fa1c95ed..9ccca038444f 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -315,7 +315,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)); |