diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-01 11:14:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-01 11:14:03 -0400 |
| commit | 1f4a90670bacbf61f2fcc19a9e0e78748c932a25 (patch) | |
| tree | e3203c99f883439125892af1afefe95fe753ba09 /net/ipv6/route.c | |
| parent | 0d262424b07582a3aa3afa85af645bd436a94a39 (diff) | |
| parent | b276764091cf241cf0b31e8cb76c67dcf9a9c1d8 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[TG3]: Update version and reldate
[TG3]: Fix bug in nvram write
[TG3]: Add reset_phy parameter to chip reset functions
[TG3]: Reset chip when changing MAC address
[TG3]: Add phy workaround
[TG3]: Call netif_carrier_off() during phy reset
[IPV6]: Fix race in route selection.
[XFRM]: fix incorrect xfrm_policy_afinfo_lock use
[XFRM]: fix incorrect xfrm_state_afinfo_lock use
[TCP]: Fix unlikely usage in tcp_transmit_skb()
[XFRM]: fix softirq-unsafe xfrm typemap->lock use
[IPSEC]: Fix IP ID selection
[NET]: use hlist_unhashed()
[IPV4]: inet_init() -> fs_initcall
[NETLINK]: cleanup unused macro in net/netlink/af_netlink.c
[PKT_SCHED] netem: fix loss
[X25]: fix for spinlock recurse and spinlock lockup with timer handler
Diffstat (limited to 'net/ipv6/route.c')
| -rw-r--r-- | net/ipv6/route.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 79078747a646..0190e39096b9 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -317,7 +317,7 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif, | |||
| 317 | __FUNCTION__, head, head ? *head : NULL, oif); | 317 | __FUNCTION__, head, head ? *head : NULL, oif); |
| 318 | 318 | ||
| 319 | for (rt = rt0, metric = rt0->rt6i_metric; | 319 | for (rt = rt0, metric = rt0->rt6i_metric; |
| 320 | rt && rt->rt6i_metric == metric; | 320 | rt && rt->rt6i_metric == metric && (!last || rt != rt0); |
| 321 | rt = rt->u.next) { | 321 | rt = rt->u.next) { |
| 322 | int m; | 322 | int m; |
| 323 | 323 | ||
| @@ -343,9 +343,12 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif, | |||
| 343 | (strict & RT6_SELECT_F_REACHABLE) && | 343 | (strict & RT6_SELECT_F_REACHABLE) && |
| 344 | last && last != rt0) { | 344 | last && last != rt0) { |
| 345 | /* no entries matched; do round-robin */ | 345 | /* no entries matched; do round-robin */ |
| 346 | static spinlock_t lock = SPIN_LOCK_UNLOCKED; | ||
| 347 | spin_lock(&lock); | ||
| 346 | *head = rt0->u.next; | 348 | *head = rt0->u.next; |
| 347 | rt0->u.next = last->u.next; | 349 | rt0->u.next = last->u.next; |
| 348 | last->u.next = rt0; | 350 | last->u.next = rt0; |
| 351 | spin_unlock(&lock); | ||
| 349 | } | 352 | } |
| 350 | 353 | ||
| 351 | RT6_TRACE("%s() => %p, score=%d\n", | 354 | RT6_TRACE("%s() => %p, score=%d\n", |
