From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH cgroup/for-3.11 3/3] cgroup: always use RCU accessors for protected accesses Date: Tue, 25 Jun 2013 10:04:51 +0800 Message-ID: <51C8FAC3.3080505@huawei.com> References: <20130621225116.GC3949@htj.dyndns.org> <20130621225204.GD3949@htj.dyndns.org> <20130621225233.GE3949@htj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130621225233.GE3949-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Fengguang Wu On 2013/6/22 6:52, Tejun Heo wrote: > kernel/cgroup.c still has places where a RCU pointer is set and > accessed directly without going through RCU_INIT_POINTER() or > rcu_dereference_protected(). They're all properly protected accesses > so nothing is broken but it leads to spurious sparse RCU address space > warnings. > > Substitute direct accesses with RCU_INIT_POINTER() and > rcu_dereference_protected(). Note that %true is specified as the > extra condition for all derference updates. This isn't ideal as all > it does is suppressing warning without actually policing > synchronization rules; however, most are scheduled to be removed > pretty soon along with css_id itself, so no reason to be more > elaborate. > > Combined with the previous changes, this removes all RCU related > sparse warnings from cgroup. > > Signed-off-by: Tejun Heo > Reported-by: Fengguang Wu > --- > kernel/cgroup.c | 21 ++++++++++++--------- > 1 file changed, 12 insertions(+), 9 deletions(-) > Acked-by; Li Zefan