aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-05-04 02:26:20 -0400
committerDavid S. Miller <davem@davemloft.net>2006-05-04 02:26:20 -0400
commit4cc7c2734e2b4032103e47d8f3e8b6fa3360d3f1 (patch)
tree2c9cac8015217e46a9166c1968ab2d90cb9fd5bf /net
parent70868eace5031298c6f6e991a40a2106957f582c (diff)
[ROSE]: Fix routing table locking in rose_remove_neigh.
The locking rule for rose_remove_neigh() are that the caller needs to hold rose_neigh_list_lock, so we better don't take it yet again in rose_neigh_list_lock. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/rose/rose_route.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 4cb6bfa6fcbd..a22542fa1bc8 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -233,11 +233,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
233 233
234 skb_queue_purge(&rose_neigh->queue); 234 skb_queue_purge(&rose_neigh->queue);
235 235
236 spin_lock_bh(&rose_neigh_list_lock);
237
238 if ((s = rose_neigh_list) == rose_neigh) { 236 if ((s = rose_neigh_list) == rose_neigh) {
239 rose_neigh_list = rose_neigh->next; 237 rose_neigh_list = rose_neigh->next;
240 spin_unlock_bh(&rose_neigh_list_lock);
241 kfree(rose_neigh->digipeat); 238 kfree(rose_neigh->digipeat);
242 kfree(rose_neigh); 239 kfree(rose_neigh);
243 return; 240 return;
@@ -246,7 +243,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
246 while (s != NULL && s->next != NULL) { 243 while (s != NULL && s->next != NULL) {
247 if (s->next == rose_neigh) { 244 if (s->next == rose_neigh) {
248 s->next = rose_neigh->next; 245 s->next = rose_neigh->next;
249 spin_unlock_bh(&rose_neigh_list_lock);
250 kfree(rose_neigh->digipeat); 246 kfree(rose_neigh->digipeat);
251 kfree(rose_neigh); 247 kfree(rose_neigh);
252 return; 248 return;
@@ -254,7 +250,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
254 250
255 s = s->next; 251 s = s->next;
256 } 252 }
257 spin_unlock_bh(&rose_neigh_list_lock);
258} 253}
259 254
260/* 255/*