]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
gcov: clang: fix clang-11+ build
authorJohannes Berg <johannes.berg@intel.com>
Thu, 22 Apr 2021 06:43:05 +0000 (16:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 May 2021 22:09:25 +0000 (08:09 +1000)
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: Stephen Rothwell <sfr@canb.auug.org.au>
kernel/gcov/clang.c

index 04a65443005d76d17031b440310437e3380a4309..d43ffd0c5ddbe82a40895051702f236cb1cc6c3b 100644 (file)
@@ -368,7 +368,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;