| To: | Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: race in net/ipv4/ipip.c ? |
| From: | Thomas Graf <tgraf@xxxxxxx> |
| Date: | Wed, 12 Jan 2005 13:53:36 +0100 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20050112122300.GA12155@xxxxxxxxxxxxxxxxx> |
| References: | <20050112122300.GA12155@xxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
* Lennert Buytenhek <20050112122300.GA12155@xxxxxxxxxxxxxxxxx> 2005-01-12 13:23
> Hi!
>
> static void ipip_tunnel_link(struct ipip_tunnel *t)
> {
> struct ipip_tunnel **tp = ipip_bucket(t);
>
> t->next = *tp;
> write_lock_bh(&ipip_lock);
> *tp = t;
> write_unlock_bh(&ipip_lock);
> }
>
> Shouldn't the "t->next = *tp" be done inside the write lock?
Why do you think so? linking may only happen on new tunnels
so they can't be found before they're assigned to the bucket.
dev_hold is called correctly so dev->priv usage is safe as
well.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | race in net/ipv4/ipip.c ?, Lennert Buytenhek |
|---|---|
| Next by Date: | Re: race in net/ipv4/ipip.c ?, YOSHIFUJI Hideaki / 吉藤英明 |
| Previous by Thread: | race in net/ipv4/ipip.c ?, Lennert Buytenhek |
| Next by Thread: | Re: race in net/ipv4/ipip.c ?, YOSHIFUJI Hideaki / 吉藤英明 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |