Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300205
b: refs/heads/master
c: c57b546
h: refs/heads/master
i:
  300203: 564fd66
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 11, 2012
1 parent eff39ad commit c94d193
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59b9997baba5242997ddc7bd96b1391f5275a5a4
refs/heads/master: c57b54684060c8aced64a5b78ff69ff289af97b9
10 changes: 8 additions & 2 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,7 @@ static int pktgen_device_event(struct notifier_block *unused,
{
struct net_device *dev = ptr;

if (!net_eq(dev_net(dev), &init_net))
if (!net_eq(dev_net(dev), &init_net) || pktgen_exiting)
return NOTIFY_DONE;

/* It is OK that we do not hold the group lock right now,
Expand Down Expand Up @@ -3755,12 +3755,18 @@ static void __exit pg_cleanup(void)
{
struct pktgen_thread *t;
struct list_head *q, *n;
struct list_head list;

/* Stop all interfaces & threads */
pktgen_exiting = true;

list_for_each_safe(q, n, &pktgen_threads) {
mutex_lock(&pktgen_thread_lock);
list_splice(&list, &pktgen_threads);
mutex_unlock(&pktgen_thread_lock);

list_for_each_safe(q, n, &list) {
t = list_entry(q, struct pktgen_thread, th_list);
list_del(&t->th_list);
kthread_stop(t->tsk);
kfree(t);
}
Expand Down

0 comments on commit c94d193

Please sign in to comment.