Thread (5 messages) 5 messages, 3 authors, 2004-11-30

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

From: Brian Haley <hidden>
Date: 2004-11-23 18:09:24

YOSHIFUJI Hideaki / 吉藤英明 wrote:
ChangeSet@1.2232, 2004-11-23 11:52:57+09:00, yoshfuji@linux-ipv6.org
 [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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help