diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 7874303220c504edcd705ed2fefbc0d9ec020397..137d1892395d3e9f9bb26ed532484b9737aaab8f 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -428,8 +428,9 @@ static void __inet_del_ifa(struct in_device *in_dev, if (prev_prom) { struct in_ifaddr *last_sec; - last_sec = rtnl_dereference(last_prim->ifa_next); rcu_assign_pointer(prev_prom->ifa_next, next_sec); + + last_sec = rtnl_dereference(last_prim->ifa_next); rcu_assign_pointer(promote->ifa_next, last_sec); rcu_assign_pointer(last_prim->ifa_next, promote); }