Subject: Re: [BK PATCH] [IPV6] Multiple locking fixes/improvements

From: Brian Haley <[email-masked]>
Date: Tue, 23 Nov 2004 13:09:24 -0500

YOSHIFUJI Hideaki / 吉藤英明 wrote:

> [email-masked], 2004-11-23 11:52:57+09:00, [email-masked]
>  [IPV6] Fix a race when dad completed during shutting down its owner interface.

> +static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
> +{
> +	read_lock_bh(&addrconf_lock);
> +	if (ifp->idev->dead)
> +		goto out;
> +	__ipv6_ifa_notify(event, ifp);
> +out:
> +	read_unlock_bh(&addrconf_lock);
>  }

Not to nitpick, but this is just easier to read:

+static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
+{
+	read_lock_bh(&addrconf_lock);
+	if (!ifp->idev->dead)
+		__ipv6_ifa_notify(event, ifp);
+	read_unlock_bh(&addrconf_lock);
  }

-Brian