From patchwork Thu Dec 15 09:53:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 706014 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tfTZD3Ylqz9sdn for ; Thu, 15 Dec 2016 21:04:36 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757626AbcLOKEa (ORCPT ); Thu, 15 Dec 2016 05:04:30 -0500 Received: from svenfoo.org ([82.94.215.22]:55718 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752534AbcLOKE2 (ORCPT ); Thu, 15 Dec 2016 05:04:28 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id 1DFF6C002B; Thu, 15 Dec 2016 10:53:28 +0100 (CET) Received: from mail.zonque.de ([127.0.0.1]) by localhost (rambrand.bugwerft.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 69sBfkGJdp-s; Thu, 15 Dec 2016 10:53:27 +0100 (CET) Received: from tao.fritz.box (pd95c9a6f.dip0.t-ipconnect.de [217.92.154.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zonque.de (Postfix) with ESMTPSA id 46788C0010; Thu, 15 Dec 2016 10:53:27 +0100 (CET) From: Daniel Mack To: ast@fb.com Cc: daniel@iogearbox.net, netdev@vger.kernel.org, davem@davemloft.net, Daniel Mack Subject: [PATCH] bpf: cgroup: annotate pointers in struct cgroup_bpf with __rcu Date: Thu, 15 Dec 2016 10:53:21 +0100 Message-Id: <20161215095321.10571-1-daniel@zonque.org> X-Mailer: git-send-email 2.9.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The member 'effective' in 'struct cgroup_bpf' is protected by RCU. Annotate it accordingly to squelch a sparse warning. Signed-off-by: Daniel Mack Acked-by: Alexei Starovoitov --- include/linux/bpf-cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h index 7b6e5d1..92bc89a 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h @@ -20,7 +20,7 @@ struct cgroup_bpf { * when this cgroup is accessed. */ struct bpf_prog *prog[MAX_BPF_ATTACH_TYPE]; - struct bpf_prog *effective[MAX_BPF_ATTACH_TYPE]; + struct bpf_prog __rcu *effective[MAX_BPF_ATTACH_TYPE]; }; void cgroup_bpf_put(struct cgroup *cgrp);