]> Git Repo - linux.git/commitdiff
gcov: clang: fix clang-11+ build
authorJohannes Berg <[email protected]>
Fri, 16 Apr 2021 22:46:23 +0000 (15:46 -0700)
committerLinus Torvalds <[email protected]>
Fri, 16 Apr 2021 23:10:37 +0000 (16:10 -0700)
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 <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Tested-by: Nick Desaulniers <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/gcov/clang.c

index c466c7fbdece557de01f448b4584bd563fa2ee09..b81f2823630d74fc152256381f1803d98a8044b9 100644 (file)
@@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
        INIT_LIST_HEAD(&fn_dup->head);
 
        cv_size = fn->num_counters * sizeof(fn->counters[0]);
-       fn_dup->counters = vmalloc(cv_size);
+       fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL);
        if (!fn_dup->counters) {
                kfree(fn_dup);
                return NULL;
This page took 0.057163 seconds and 4 git commands to generate.