Commit 4cc7c273 authored by Ralf Baechle's avatar Ralf Baechle Committed by David S. Miller

[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: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70868eac
...@@ -233,11 +233,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) ...@@ -233,11 +233,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
skb_queue_purge(&rose_neigh->queue); skb_queue_purge(&rose_neigh->queue);
spin_lock_bh(&rose_neigh_list_lock);
if ((s = rose_neigh_list) == rose_neigh) { if ((s = rose_neigh_list) == rose_neigh) {
rose_neigh_list = rose_neigh->next; rose_neigh_list = rose_neigh->next;
spin_unlock_bh(&rose_neigh_list_lock);
kfree(rose_neigh->digipeat); kfree(rose_neigh->digipeat);
kfree(rose_neigh); kfree(rose_neigh);
return; return;
...@@ -246,7 +243,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) ...@@ -246,7 +243,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
while (s != NULL && s->next != NULL) { while (s != NULL && s->next != NULL) {
if (s->next == rose_neigh) { if (s->next == rose_neigh) {
s->next = rose_neigh->next; s->next = rose_neigh->next;
spin_unlock_bh(&rose_neigh_list_lock);
kfree(rose_neigh->digipeat); kfree(rose_neigh->digipeat);
kfree(rose_neigh); kfree(rose_neigh);
return; return;
...@@ -254,7 +250,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) ...@@ -254,7 +250,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
s = s->next; s = s->next;
} }
spin_unlock_bh(&rose_neigh_list_lock);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment