Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2829504pxb; Mon, 19 Apr 2021 15:21:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw31NFWaIpMI89XaO6Y+4gYtjcPhNtdgXEis37h7GduEhTEp1+j6OoHx9AyX+cUbawp1X/I X-Received: by 2002:a17:90a:fa98:: with SMTP id cu24mr1420259pjb.202.1618870895687; Mon, 19 Apr 2021 15:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618870895; cv=none; d=google.com; s=arc-20160816; b=yunIGi4vYONe1I9SyOACTiZUig/70Vu3lXD7jF9jTFRMH9AfYtUeudaGV9W5UkVyiA PcvUn5vu62bzy4leebnMqH7C2g5HCTC/NXxRmrwzwWnpFgdRIPvlZHsDg8MnViBDhKe4 e4XDEZ8lJmsCTYo8ZhJWUOb0pjyy60eWo5zcPXGKfSBs3p2kV9YJxREbLS7RlSQZcr63 Pb+unE5ngJ4oc3NGiZXwjq1E1QqZLtllLx9m2aNp3X9U1kN0Fo2m3aluJ3GjIc2x0VCx MT42+BTpycbgLWLfRFkHZQ88UEPCJgseOb8XTgoAz0UjTtEzXrnewEzXoR30MabHtrhR N+kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FfJ2kcX/cDPARvKDyRfhZ3ZbdnKordAyQTnrTIh2yOQ=; b=rS1Y7o6T4dQl3L1GzsXn06Jkxid1zwZqxfx9T29DaHbq05dHUjSS0dGgyZbJUJ2w8s 7IZwkfQpDL6j5JKAD+ARcOe+UUsQKytcaAVdZeGzT07PLZlNiuX8ag9gQ7E4IfFv5kuZ 3Au9cc92zNPvbHp9jhUA4czWvYO5DmuqHlH9H7PIebpEOzGkcr/xPh4o+WVUr4jgC+jA InL6dDRhY8DbeI0TRgIt74Jwe7XY19OMcd0Vn7qoGDmeqz3gridNbAnChUKJe7+VUjqY ViqelShy4KTTsTFZQofCInmTWglBSpbKWDmFEjOXGTlXEE9Nv3NF0HB2QIcNoi3NozBA 3HLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LIFluKIi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si866870pjr.71.2021.04.19.15.21.23; Mon, 19 Apr 2021 15:21:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LIFluKIi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242516AbhDSUp5 (ORCPT + 99 others); Mon, 19 Apr 2021 16:45:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:54296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242559AbhDSUor (ORCPT ); Mon, 19 Apr 2021 16:44:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD2B2613AB; Mon, 19 Apr 2021 20:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618865057; bh=AwWX+CIzR0IFXAElx5wFS9CUiBr0mwtGqFIb5LHiv0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LIFluKIih2vqiLMGOv7zJjEKBxkHbrUILRF86FDKiAA662HFBohjEwOezdt32+lSI D3T3r2BRGYuWasITItw7gm/5d5LoI1qH0d7uEzlMN7/zO2VJc8/gmaQzjSSzrOmfHK tJr/jbK7zIL4jkrOvu7zOr+cKl5A94sG2Jx8wvCWcwNDriBfsLEbiRFXr6aA5RbTxs 1+FSz51dOLcRK2wNkXs2V50kkkUKmwP4QaYSLiXvFUqhKIkRQpGplkkGU7PiPlYuOr X/e/7dsP+ulqX/mY8L8PxQl/dryk9NH6ebAss0b5dosBRpMZTnYXIIrPLqHhmuHoXH JnHMMWT36QQPA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Nick Desaulniers , Andrew Morton , Linus Torvalds , Sasha Levin , clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.11 22/23] gcov: clang: fix clang-11+ build Date: Mon, 19 Apr 2021 16:43:41 -0400 Message-Id: <20210419204343.6134-22-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210419204343.6134-1-sashal@kernel.org> References: <20210419204343.6134-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 04c53de57cb6435738961dace8b1b71d3ecd3c39 ] 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 Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- 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 c466c7fbdece..b81f2823630d 100644 --- a/kernel/gcov/clang.c +++ b/kernel/gcov/clang.c @@ -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; -- 2.30.2