Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754004AbcJDPnf (ORCPT ); Tue, 4 Oct 2016 11:43:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57482 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbcJDPne (ORCPT ); Tue, 4 Oct 2016 11:43:34 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1475588310-10910-1-git-send-email-asavkov@redhat.com> References: <1475588310-10910-1-git-send-email-asavkov@redhat.com> To: Artem Savkov Cc: dhowells@redhat.com, linux-cachefs@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Use proper lock in fscache_objlist_config. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7736.1475595811.1@warthog.procyon.org.uk> Date: Tue, 04 Oct 2016 16:43:31 +0100 Message-ID: <7737.1475595811@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Oct 2016 15:43:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 505 Lines: 13 Artem Savkov wrote: > fscache_objlist_config doesn't hold rkey->sem when calling user_key_payload, > that can result in a "suspicious RCU usage" warning. It does hold > rcu_read_lock, so it either needs to use unprotected rcu_dereference, > or take rkey->sem instead of rcu_read_lock. It shouldn't take key->sem. The RCU lock should be necessary as user_key_payload() wraps a call to rcu_dereference(). Did you encounter a lockdep report or did you visually inspect this? David