Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75491
b: refs/heads/master
c: ecd2ebd
h: refs/heads/master
i:
  75489: 4c50ef3
  75487: 3159dbe
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Jan 11, 2008
1 parent 6740ce7 commit aca9450
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27d1cba21fcc50c37eef5042c6be9fa7135e88fc
refs/heads/master: ecd2ebdea350c40e73c00d400d74c8a09c072082
12 changes: 12 additions & 0 deletions trunk/net/ax25/af_ax25.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,22 @@ static void ax25_kill_by_device(struct net_device *dev)
return;

spin_lock_bh(&ax25_list_lock);
again:
ax25_for_each(s, node, &ax25_list) {
if (s->ax25_dev == ax25_dev) {
s->ax25_dev = NULL;
spin_unlock_bh(&ax25_list_lock);
ax25_disconnect(s, ENETUNREACH);
spin_lock_bh(&ax25_list_lock);

/* The entry could have been deleted from the
* list meanwhile and thus the next pointer is
* no longer valid. Play it safe and restart
* the scan. Forward progress is ensured
* because we set s->ax25_dev to NULL and we
* are never passed a NULL 'dev' argument.
*/
goto again;
}
}
spin_unlock_bh(&ax25_list_lock);
Expand Down

0 comments on commit aca9450

Please sign in to comment.