netdev
[Top] [All Lists]

[IPV6]: Fix tunnel list locking in ip6_tunnel.c.

To: davem@xxxxxxxxxxxxx
Subject: [IPV6]: Fix tunnel list locking in ip6_tunnel.c.
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Sat, 05 Feb 2005 01:56:33 +0900 (JST)
Cc: yoshfuji@xxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
Organization: USAGI Project
Sender: netdev-bounce@xxxxxxxxxxx
Hello.

We need to fix tunnel list locking in ip6_tunnel.c as well.
Noticed by jean-mickael guerin <jean-mickael.guerin@xxxxxxxxx>.

Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>

===== net/ipv6/ip6_tunnel.c 1.27 vs edited =====
--- 1.27/net/ipv6/ip6_tunnel.c  2005-01-14 13:41:06 +09:00
+++ edited/net/ipv6/ip6_tunnel.c        2005-02-05 01:50:53 +09:00
@@ -180,10 +180,10 @@
 {
        struct ip6_tnl **tp = ip6ip6_bucket(&t->parms);
 
-       write_lock_bh(&ip6ip6_lock);
        t->next = *tp;
-       write_unlock_bh(&ip6ip6_lock);
+       write_lock_bh(&ip6ip6_lock);
        *tp = t;
+       write_unlock_bh(&ip6ip6_lock);
 }
 
 /**

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

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