Skip to content

Commit

Permalink
[IPV6]: The ifa lock is a BH lock
Browse files Browse the repository at this point in the history
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: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Aug 9, 2006
1 parent 79860a9 commit 06aebfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06aebfb

Please sign in to comment.