aboutsummaryrefslogtreecommitdiff
path: root/net/sched/sch_netem.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2017-04-21 16:22:01 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-04-21 16:22:01 +1000
commit2f9345705f5308ec2c7a16db5ea9f0f61745e6ab (patch)
tree662c9296e8458620c6662fd269bebf78e6fa9196 /net/sched/sch_netem.c
parent4eefe195614d150ecc99c21ebad5d88a054f6df8 (diff)
parenta55dddf57c2d08c252eb07955d5757156ffacec7 (diff)
Merge branch 'akpm/master'
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r--net/sched/sch_netem.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index f0ce4780f395..1b3dd6190e93 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -702,15 +702,11 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
spinlock_t *root_lock;
struct disttable *d;
int i;
- size_t s;
if (n > NETEM_DIST_MAX)
return -EINVAL;
- s = sizeof(struct disttable) + n * sizeof(s16);
- d = kmalloc(s, GFP_KERNEL | __GFP_NOWARN);
- if (!d)
- d = vmalloc(s);
+ d = kvmalloc(sizeof(struct disttable) + n * sizeof(s16), GFP_KERNEL);
if (!d)
return -ENOMEM;