From: YOSHIFUJI H. / <yos...@li...> - 2005-01-07 03:35:00
|
Hello. I don't think we really need to obtain this lock here. Signed-off-by: Hideaki YOSHIFUJI <yos...@li...> After applying this patch, I think we can stop exporting addrconf_lock. ===== net/sctp/ipv6.c 1.57 vs edited ===== --- 1.57/net/sctp/ipv6.c 2004-12-28 10:56:34 +09:00 +++ edited/net/sctp/ipv6.c 2005-01-07 12:29:26 +09:00 @@ -319,11 +319,8 @@ struct inet6_ifaddr *ifp; struct sctp_sockaddr_entry *addr; - read_lock(&addrconf_lock); - if ((in6_dev = __in6_dev_get(dev)) == NULL) { - read_unlock(&addrconf_lock); + if ((in6_dev = in6_dev_get(dev)) == NULL) return; - } read_lock(&in6_dev->lock); for (ifp = in6_dev->addr_list; ifp; ifp = ifp->if_next) { @@ -340,7 +337,7 @@ } read_unlock(&in6_dev->lock); - read_unlock(&addrconf_lock); + in6_dev_put(in6_dev); } /* Initialize a sockaddr_storage from in incoming skb. */ -- Hideaki YOSHIFUJI @ USAGI Project <yos...@li...> GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA |
From: YOSHIFUJI H. / <yos...@li...> - 2005-01-07 03:41:05
|
In article <200...@li...> (at Fri, 07 Jan 2005 12:35:19 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yos...@li...> says: > After applying this patch, I think we can stop exporting > addrconf_lock. Oops, sorry, we can't, because in6_dev_get() is inlined function, and it uses addrconf_lock. --yoshfuji |
From: David S. M. <da...@da...> - 2005-01-19 22:38:51
|
On Fri, 07 Jan 2005 12:41:23 +0900 (JST) YOSHIFUJI Hideaki / =1B$B5HF#1QL@=1B(B <yos...@li...> wrote: > In article <200...@li...> (at Fri, 0= 7 Jan 2005 12:35:19 +0900 (JST)), YOSHIFUJI Hideaki / =1B$B5HF#1QL@=1B(B <y= os...@li...> says: >=20 > > After applying this patch, I think we can stop exporting > > addrconf_lock. >=20 > Oops, sorry, we can't, because in6_dev_get() is inlined function, > and it uses addrconf_lock. Right. I think we should just leave the SCTP code as-is for now. |