mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
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>
This commit is contained in:
parent
19694ac88d
commit
b30c516f87
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user