diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-01-17 09:51:46 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-01-17 09:51:46 +0100 |
commit | 6eadf1075c6f923fece419e38cf05bff559aefcd (patch) | |
tree | b743ce0a3743d6f1b915b19b077a6d5bad980ea1 /net/sched/sch_netem.c | |
parent | a1c611745c8c4e8996c1877d4e5d0fc95f227c38 (diff) | |
parent | c10076c4304083af15a41f6bc5e657e781c1f9a6 (diff) |
Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index eb3b9a86c6e..a4ab207cdc5 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -488,7 +488,7 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr) return -EINVAL; s = sizeof(struct disttable) + n * sizeof(s16); - d = kmalloc(s, GFP_KERNEL); + d = kmalloc(s, GFP_KERNEL | __GFP_NOWARN); if (!d) d = vmalloc(s); if (!d) @@ -501,9 +501,10 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr) root_lock = qdisc_root_sleeping_lock(sch); spin_lock_bh(root_lock); - dist_free(q->delay_dist); - q->delay_dist = d; + swap(q->delay_dist, d); spin_unlock_bh(root_lock); + + dist_free(d); return 0; } |