diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2023-06-30 08:41:39 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2023-06-30 08:41:39 -0700 |
| commit | 44f10dbefd5e41b3385af91f855a57aa2afaf40e (patch) | |
| tree | 944c9f1cda8322691468e6f10dc5b0d41c487621 /lib/test_bpf.c | |
| parent | 0a30901b0732a59e038088d3de3e5611db1870d3 (diff) | |
| parent | e55e5df193d247a38a5e1ac65a5316a0adcc22fa (diff) | |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'lib/test_bpf.c')
| -rw-r--r-- | lib/test_bpf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c index ade9ac672adb..fa0833410ac1 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -15056,8 +15056,7 @@ static __init int prepare_tail_call_tests(struct bpf_array **pprogs) int which, err; /* Allocate the table of programs to be used for tall calls */ - progs = kzalloc(sizeof(*progs) + (ntests + 1) * sizeof(progs->ptrs[0]), - GFP_KERNEL); + progs = kzalloc(struct_size(progs, ptrs, ntests + 1), GFP_KERNEL); if (!progs) goto out_nomem; |
