Commit 453a7051 authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

[NET]: In dst_ifdown(), synchronize_kernel() before dropping dev ref.

parent a2b7d9e0
......@@ -231,6 +231,12 @@ static void dst_ifdown(struct dst_entry *dst, int unregister)
if (unregister) {
dst->dev = &loopback_dev;
dev_hold(&loopback_dev);
/* Wait for at least one quiescent state after
* detaching the stale device from dst.
*/
synchronize_kernel();
dev_put(dev);
if (dst->neighbour && dst->neighbour->dev == dev) {
dst->neighbour->dev = &loopback_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment