Skip to content

Commit

Permalink
net: fix __dst_destroy_metrics_generic()
Browse files Browse the repository at this point in the history
dst_default_metrics is readonly, we dont want to kfree() it later.

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed May 24, 2011
1 parent 19694ac commit b30c516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit b30c516

Please sign in to comment.