aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/ematch.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r--net/sched/ematch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 0fd0768a17c6..8f8a16da72a8 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -251,12 +251,11 @@ static int tcf_em_validate(struct tcf_proto *tp,
251 goto errout; 251 goto errout;
252 em->data = *(u32 *) data; 252 em->data = *(u32 *) data;
253 } else { 253 } else {
254 void *v = kmalloc(data_len, GFP_KERNEL); 254 void *v = kmemdup(data, data_len, GFP_KERNEL);
255 if (v == NULL) { 255 if (v == NULL) {
256 err = -ENOBUFS; 256 err = -ENOBUFS;
257 goto errout; 257 goto errout;
258 } 258 }
259 memcpy(v, data, data_len);
260 em->data = (unsigned long) v; 259 em->data = (unsigned long) v;
261 } 260 }
262 } 261 }