netdev
[Top] [All Lists]

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

To: yoshfuji@xxxxxxxxxxxxxx
Subject: Re: [BK PATCH] [IPV6] Multiple locking fixes/improvements
From: Brian Haley <Brian.Haley@xxxxxx>
Date: Tue, 23 Nov 2004 13:09:24 -0500
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20041122.223205.14979415.yoshfuji@xxxxxxxxxxxxxx>
Organization: HP Linux and Open Source Lab
References: <20041122.223205.14979415.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
YOSHIFUJI Hideaki / 吉藤英明 wrote:

ChangeSet@xxxxxx, 2004-11-23 11:52:57+09:00, yoshfuji@xxxxxxxxxxxxxx
 [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


<Prev in Thread] Current Thread [Next in Thread>