Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266828
b: refs/heads/master
c: 6ccc3ab
h: refs/heads/master
v: v3
  • Loading branch information
huajun li authored and David S. Miller committed Oct 17, 2011
1 parent 2e50cb8 commit 78d0439
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 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: e6f8aa9b90dbb9dbe56e493b91132ced26eaaf81
refs/heads/master: 6ccc3abdc97e07e6895323fdab89f84e58b40ece
14 changes: 13 additions & 1 deletion trunk/net/core/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ static int __init flow_cache_init(struct flow_cache *fc)

for_each_online_cpu(i) {
if (flow_cache_cpu_prepare(fc, i))
return -ENOMEM;
goto err;
}
fc->hotcpu_notifier = (struct notifier_block){
.notifier_call = flow_cache_cpu,
Expand All @@ -426,6 +426,18 @@ static int __init flow_cache_init(struct flow_cache *fc)
add_timer(&fc->rnd_timer);

return 0;

err:
for_each_possible_cpu(i) {
struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, i);
kfree(fcp->hash_table);
fcp->hash_table = NULL;
}

free_percpu(fc->percpu);
fc->percpu = NULL;

return -ENOMEM;
}

static int __init flow_cache_init_global(void)
Expand Down

0 comments on commit 78d0439

Please sign in to comment.