Skip to content

Commit 1696704

Browse files
committed
Merge branch 'bpf-next/master' into for-next
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2 parents cd0beac + b6ab509 commit 1696704

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/core/filter.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,8 @@ static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp)
12651265
* so we need to keep the user BPF around until the 2nd
12661266
* pass. At this time, the user BPF is stored in fp->insns.
12671267
*/
1268-
old_prog = kmemdup(fp->insns, old_len * sizeof(struct sock_filter),
1269-
GFP_KERNEL | __GFP_NOWARN);
1268+
old_prog = kmemdup_array(fp->insns, old_len, sizeof(struct sock_filter),
1269+
GFP_KERNEL | __GFP_NOWARN);
12701270
if (!old_prog) {
12711271
err = -ENOMEM;
12721272
goto out_err;

0 commit comments

Comments
 (0)