diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 7ce22a2c07ce..6d9b072d903b 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1757,7 +1757,7 @@ static int inet_validate_link_af(const struct net_device *dev, | |||
1757 | struct nlattr *a, *tb[IFLA_INET_MAX+1]; | 1757 | struct nlattr *a, *tb[IFLA_INET_MAX+1]; |
1758 | int err, rem; | 1758 | int err, rem; |
1759 | 1759 | ||
1760 | if (dev && !__in_dev_get_rtnl(dev)) | 1760 | if (dev && !__in_dev_get_rcu(dev)) |
1761 | return -EAFNOSUPPORT; | 1761 | return -EAFNOSUPPORT; |
1762 | 1762 | ||
1763 | err = nla_parse_nested(tb, IFLA_INET_MAX, nla, inet_af_policy, NULL); | 1763 | err = nla_parse_nested(tb, IFLA_INET_MAX, nla, inet_af_policy, NULL); |
@@ -1781,7 +1781,7 @@ static int inet_validate_link_af(const struct net_device *dev, | |||
1781 | 1781 | ||
1782 | static int inet_set_link_af(struct net_device *dev, const struct nlattr *nla) | 1782 | static int inet_set_link_af(struct net_device *dev, const struct nlattr *nla) |
1783 | { | 1783 | { |
1784 | struct in_device *in_dev = __in_dev_get_rtnl(dev); | 1784 | struct in_device *in_dev = __in_dev_get_rcu(dev); |
1785 | struct nlattr *a, *tb[IFLA_INET_MAX+1]; | 1785 | struct nlattr *a, *tb[IFLA_INET_MAX+1]; |
1786 | int rem; | 1786 | int rem; |
1787 | 1787 | ||