Skip to content

Commit

Permalink
net: Fix more stale on-stack list_head objects.
Browse files Browse the repository at this point in the history
From: Eric W. Biederman <[email protected]>

In the beginning with batching unreg_list was a list that was used only
once in the lifetime of a network device (I think).  Now we have calls
using the unreg_list that can happen multiple times in the life of a
network device like dev_deactivate and dev_close that are also using the
unreg_list.  In addition in unregister_netdevice_queue we also do a
list_move because for devices like veth pairs it is possible that
unregister_netdevice_queue will be called multiple times.

So I think the change below to fix dev_deactivate which Eric D. missed
will fix this problem.  Now to go test that.

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ebiederm authored and davem330 committed Feb 20, 2011
1 parent 2205a6e commit 5f04d50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,7 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
}
mutex_unlock(&local->iflist_mtx);
unregister_netdevice_many(&unreg_list);
list_del(&unreg_list);
}

static u32 ieee80211_idle_off(struct ieee80211_local *local,
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ void dev_deactivate(struct net_device *dev)

list_add(&dev->unreg_list, &single);
dev_deactivate_many(&single);
list_del(&single);
}

static void dev_init_scheduler_queue(struct net_device *dev,
Expand Down

0 comments on commit 5f04d50

Please sign in to comment.