aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-07-20 16:09:16 +0800
committerAlex Shi <alex.shi@linaro.org>2016-07-20 16:09:16 +0800
commit204f956933371e80867606b2dc07aab06e82be12 (patch)
treecc9ccfbeae074bfcefa9570b86ffd51c7287a45e /net/ipv4/devinet.c
parentc863d9e9256315f6d91f866b95996e2c03052e12 (diff)
parent1d508e233d21a7848cf54d7d03b40dac2d9ea873 (diff)
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-androidlsk-v4.1-16.07-android
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 280d46f947ea..a57056d87a43 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -334,6 +334,9 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
ASSERT_RTNL();
+ if (in_dev->dead)
+ goto no_promotions;
+
/* 1. Deleting primary ifaddr forces deletion all secondaries
* unless alias promotion is set
**/
@@ -380,6 +383,7 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
fib_del_ifaddr(ifa, ifa1);
}
+no_promotions:
/* 2. Unlink it */
*ifap = ifa1->ifa_next;