Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06aebfb7 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[IPV6]: The ifa lock is a BH lock



The ifa lock is expected to be taken in BH context (by addrconf timers)
so we must disable BH when accessing it from user context.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 79860a9a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1909,11 +1909,11 @@ static int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen,
	ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags);

	if (!IS_ERR(ifp)) {
		spin_lock(&ifp->lock);
		spin_lock_bh(&ifp->lock);
		ifp->valid_lft = valid_lft;
		ifp->prefered_lft = prefered_lft;
		ifp->tstamp = jiffies;
		spin_unlock(&ifp->lock);
		spin_unlock_bh(&ifp->lock);

		addrconf_dad_start(ifp, 0);
		in6_ifa_put(ifp);