]> git.pld-linux.org Git - packages/kernel.git/blame - atm-14-clip-neigh-lock.patch
- obsolete (new driver name sym53c8xx_2 doesn't conflict now)
[packages/kernel.git] / atm-14-clip-neigh-lock.patch
CommitLineData
23c654c5
JR
1>thursday. the box is still up and oops-free this morning. so, we
2>definately have an smp problem here...
3
4its a start!
5
6>now, how in the world do we go about tracking something like this down?
7
8try the following patch. the neighbour code in clip seems a bit
9non-standard -- there might be other lossage
10
11Index: net/atm/clip.c
12===================================================================
13RCS file: /afs/cmf/project/cvsroot/linux/net/atm/clip.c,v
14retrieving revision 1.8
15diff -u -r1.8 clip.c
16--- net/atm/clip.c 7 Mar 2003 18:54:44 -0000 1.8
17+++ net/atm/clip.c 10 Mar 2003 12:33:43 -0000
18@@ -121,13 +121,15 @@
19 /*DPRINTK("idle_timer_check\n");*/
20 write_lock(&clip_tbl.lock);
21 for (i = 0; i <= NEIGH_HASHMASK; i++) {
22- struct neighbour **np;
23+ struct neighbour *n, **np;
24
25- for (np = &clip_tbl.hash_buckets[i]; *np;) {
26- struct neighbour *n = *np;
27+ np = &clip_tbl.hash_buckets[i];
28+ while ((n = *np) != NULL) {
29 struct atmarp_entry *entry = NEIGH2ENTRY(n);
30 struct clip_vcc *clip_vcc;
31
32+ write_lock(&n->lock);
33+
34 for (clip_vcc = entry->vccs; clip_vcc;
35 clip_vcc = clip_vcc->next)
36 if (clip_vcc->idle_timeout &&
37@@ -139,8 +141,10 @@
38 atm_async_release_vcc(clip_vcc->vcc,
39 -ETIMEDOUT);
40 }
41+
42 if (entry->vccs ||
43 time_before(jiffies, entry->expires)) {
44+ write_unlock(&n->lock);
45 np = &n->next;
46 continue;
47 }
48@@ -152,12 +156,14 @@
49 while ((skb = skb_dequeue(&n->arp_queue)) !=
50 NULL)
51 dev_kfree_skb(skb);
52+ write_unlock(&n->lock);
53 np = &n->next;
54 continue;
55 }
56 *np = n->next;
57 DPRINTK("expired neigh %p\n",n);
58 n->dead = 1;
59+ write_unlock(&n->lock);
60 neigh_release(n);
61 }
62 }
63
64
65-------------------------------------------------------
66This sf.net email is sponsored by:ThinkGeek
67Welcome to geek heaven.
68http://thinkgeek.com/sf
69_______________________________________________
70Linux-atm-general mailing list
71Linux-atm-general@lists.sourceforge.net
72https://lists.sourceforge.net/lists/listinfo/linux-atm-general
This page took 1.114056 seconds and 4 git commands to generate.