Skip to content

Commit

Permalink
[ROSE]: Fix routing table locking in rose_remove_neigh.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ralfbaechle authored and davem330 committed May 4, 2006
1 parent 70868ea commit 4cc7c27
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/rose/rose_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -246,15 +243,13 @@ 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;
}

s = s->next;
}
spin_unlock_bh(&rose_neigh_list_lock);
}

/*
Expand Down

0 comments on commit 4cc7c27

Please sign in to comment.