archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <>
To: Andrew Morton <>
	Nick Desaulniers <>,
	Johannes Berg <>
Subject: [PATCH] gcov: clang: fix clang-11+ build
Date: Mon, 12 Apr 2021 21:42:10 +0200	[thread overview]
Message-ID: <20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid> (raw)

From: Johannes Berg <>

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.

Signed-off-by: Johannes Berg <>
This fixes a clang-11 build issue reported against current
linux-next since the clang-11+ support landed in v5.12-rc5
and my kvmalloc() conversion patch is in akpm/linux-next.
I guess this should be folded into

  gcov: use kvmalloc()

If desired, I can send a combined patch instead.
 kernel/gcov/clang.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/gcov/clang.c b/kernel/gcov/clang.c
index 04a65443005d..d43ffd0c5ddb 100644
--- a/kernel/gcov/clang.c
+++ b/kernel/gcov/clang.c
@@ -368,7 +368,7 @@ static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
 	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) {
 		return NULL;

             reply	other threads:[~2021-04-12 19:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 19:42 Johannes Berg [this message]
2021-04-12 22:41 ` Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid \ \ \ \ \ \
    --subject='Re: [PATCH] gcov: clang: fix clang-11+ build' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox