Skip to content

Commit 04c53de

Browse files
jmberg-inteltorvalds
authored andcommitted
gcov: clang: fix clang-11+ build
With clang-11+, the code is broken due to my kvmalloc() conversion (which predated the clang-11 support code) leaving one vmalloc() in place. Fix that. Link: https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4583769 commit 04c53de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/gcov/clang.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
369369
INIT_LIST_HEAD(&fn_dup->head);
370370

371371
cv_size = fn->num_counters * sizeof(fn->counters[0]);
372-
fn_dup->counters = vmalloc(cv_size);
372+
fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL);
373373
if (!fn_dup->counters) {
374374
kfree(fn_dup);
375375
return NULL;

0 commit comments

Comments
 (0)