Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1825185ybv; Sat, 8 Feb 2020 06:49:20 -0800 (PST) X-Google-Smtp-Source: APXvYqx643TL7iw/dQloQhMCr+h5xI7j0oTzOVVRkatqXMZ7Pi5CnfyuvRt97T35tIVbT1/Bdg7n X-Received: by 2002:aca:ed94:: with SMTP id l142mr5592035oih.58.1581173360480; Sat, 08 Feb 2020 06:49:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581173360; cv=none; d=google.com; s=arc-20160816; b=tFmHLPtAm7TpGTwf9Xdd1rfoZuHUh527X0NoH/yq2FUblOwg+cvRe/2TdFAes7kAnB kBrkP/KVt6KdJE+zk3oDrdZPAud7czsuazOG5s5YMFmCnDzXMvcGRnOMCGPm6e65k6fm Mqd5iOiZEkbjeJDBxgYHF1RtME2xkP4Z3KVdhXgLkDtSWfXt7DJA6bP0JeFeCUYV51ze CXAZUqtBfhzCLxaUSu+0hqKWgOuOXj4gBYLh1f5Sobymen9Md+bMimuoqtNnO0N4B1A5 4kohC32dTmTKoF/sq6w3FwB9l8UU5MHQti5ydpR282jKS32u2DWvzfnNoguMJGx2y39E K87g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=umKYkZ+n1hghb0Jr4hdnB/RVp/UqOXWLvmLyfjg6Ugw=; b=hJahai3MjnAPHHjiBSOWa9mPaOavB3Tt+TrG8SGSyUT74HyZ1/B26ltD2qyH8YIvho E8ziU7aO/RpxeXUVgOVSgAgHpcNWFaxLTcCCo9OnVequ64vNgVhB2JsxvxNzHjMRh5fU AmlK2b1D6RdhkSX00gvGhQLa0dlDKMVik9pNrgD0hbJyPmd7hNDz7y05n6f7N4BFRPhk 1R+qhtV6I5FRV5FIF77HX1uKIoVWNvod+5A7Lp+24fGwaH37D+3SZaRiZUhGeUndAQ1v A44tByxUBPRJj85IDLN2xJVQv3W1vjIcAogt4PLw4dK2Q3X6D+2rGZa86QkzLoy7JNZZ kxPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u0Er+8CL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si1625283otq.93.2020.02.08.06.49.08; Sat, 08 Feb 2020 06:49:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u0Er+8CL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbgBHOq0 (ORCPT + 99 others); Sat, 8 Feb 2020 09:46:26 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:38463 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727317AbgBHOq0 (ORCPT ); Sat, 8 Feb 2020 09:46:26 -0500 Received: by mail-pj1-f65.google.com with SMTP id j17so2207784pjz.3 for ; Sat, 08 Feb 2020 06:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=umKYkZ+n1hghb0Jr4hdnB/RVp/UqOXWLvmLyfjg6Ugw=; b=u0Er+8CLUzoLx1hW2cmiqFqvmrAiNsVQbwOI9477K3oZVp5LbUl3zEcES5biwTiRMt Cdig9edK6EUn2HOv18tQS1FslaP/XD/Xq1VlYLaOkoHzprGxCE2bJyIbrlcaLxxomzuC hkSJ51ehrfIMbrExu/ZasJ908ZuPnYGGOLE0A4B81PQ2ONXxl63+qEk5DoGrv/Lho9B0 HAcYDmW6xSgKXrJ2UulT/JQKahpQGI+TGXkfj1QWg5zI5BxnNa5TZkqtgejRnpYFUYls r+m5Q0Q+EVweJplXvOJ3Kph/gxj7TF3ZMoX106lyFCo2zX660nPCifoSNw+JVMlcRqQL yQ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=umKYkZ+n1hghb0Jr4hdnB/RVp/UqOXWLvmLyfjg6Ugw=; b=A/5N+eeAmRWbTsOsmpL95iLomlZzQBuAkpNfyngwzyJWHdFOwkMApkB5kzedkIxB0s ev2cpTr2AJQkEAzZBFmW2UhXK8kTMvtZ3ovUva6AK1DvZnUwsDzwjMdUNb7oT74kDpE2 Ykw8koWNtJQgKmF7oe5pFTYNHvHZ2aCvEFEUFYvK9WlfZh6hWjs8hbhSGX92U/IvbyYS +A6A9nKihvk0ZsNZ8ZstC4ShI/VkKBBqKqdLeJ8nytTq1dG0C9peZBDeJx49lNwkMYy3 Z+97U00n95q0D5/Yr8dey7B/9LaqSZOd5rGi2oc1pa0pMQJ/lk6QSYugW0Ck2TTzpzCk tkeg== X-Gm-Message-State: APjAAAWQIL0Vbjuylp0MUGcYGZ8SNyTlA7gZ59K41XF6w2NcxrQd/eVx Nn7IQ3VVd9vuxRVaiqMq2Tw= X-Received: by 2002:a17:90a:c301:: with SMTP id g1mr10355574pjt.88.1581173185375; Sat, 08 Feb 2020 06:46:25 -0800 (PST) Received: from localhost.localdomain ([146.196.37.145]) by smtp.googlemail.com with ESMTPSA id p24sm6750353pff.69.2020.02.08.06.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2020 06:46:24 -0800 (PST) From: Amol Grover To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman Cc: linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Joel Fernandes , Madhuparna Bhowmik , "Paul E . McKenney" , Amol Grover Subject: [PATCH] sched: Annotate perf_event_ctxp with __rcu Date: Sat, 8 Feb 2020 20:15:51 +0530 Message-Id: <20200208144550.18486-1-frextrite@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org perf_event_ctxp is used in RCU context in kernel/events/core.c, tell sparse about it as well. Fix the following instances of sparse error: kernel/events/core.c:1384:15: error: incompatible types in comparison kernel/events/core.c:1397:28: error: incompatible types in comparison kernel/events/core.c:3264:25: error: incompatible types in comparison kernel/events/core.c:3265:25: error: incompatible types in comparison kernel/events/core.c:4340:25: error: incompatible types in comparison kernel/events/core.c:7091:23: error: incompatible types in comparison kernel/events/core.c:7870:23: error: incompatible types in comparison kernel/events/core.c:8971:23: error: incompatible types in comparison kernel/events/core.c:11865:9: error: incompatible types in comparison kernel/events/core.c:11975:17: error: incompatible types in comparison Signed-off-by: Amol Grover --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 716ad1d8d95e..5df1778cfdf4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1063,7 +1063,7 @@ struct task_struct { unsigned int futex_state; #endif #ifdef CONFIG_PERF_EVENTS - struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts]; + struct perf_event_context __rcu *perf_event_ctxp[perf_nr_task_contexts]; struct mutex perf_event_mutex; struct list_head perf_event_list; #endif -- 2.24.1