diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-05-04 10:26:20 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-05-04 10:26:20 +0400 |
commit | 4cc7c2734e2b4032103e47d8f3e8b6fa3360d3f1 (patch) | |
tree | 2c9cac8015217e46a9166c1968ab2d90cb9fd5bf /net/rose | |
parent | 70868eace5031298c6f6e991a40a2106957f582c (diff) | |
download | linux-4cc7c2734e2b4032103e47d8f3e8b6fa3360d3f1.tar.xz |
[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/rose')
-rw-r--r-- | net/rose/rose_route.c | 5 |
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) skb_queue_purge(&rose_neigh->queue); - spin_lock_bh(&rose_neigh_list_lock); - if ((s = rose_neigh_list) == rose_neigh) { rose_neigh_list = rose_neigh->next; - spin_unlock_bh(&rose_neigh_list_lock); kfree(rose_neigh->digipeat); kfree(rose_neigh); return; @@ -246,7 +243,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) while (s != NULL && s->next != NULL) { if (s->next == rose_neigh) { s->next = rose_neigh->next; - spin_unlock_bh(&rose_neigh_list_lock); kfree(rose_neigh->digipeat); kfree(rose_neigh); return; @@ -254,7 +250,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) s = s->next; } - spin_unlock_bh(&rose_neigh_list_lock); } /* |