Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937AbcJDPpT convert rfc822-to-8bit (ORCPT ); Tue, 4 Oct 2016 11:45:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52226 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbcJDPpR (ORCPT ); Tue, 4 Oct 2016 11:45:17 -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: <1475588260-10838-1-git-send-email-asavkov@redhat.com> References: <1475588260-10838-1-git-send-email-asavkov@redhat.com> To: Artem Savkov Cc: dhowells@redhat.com, linux-nfs@vger.kernel.org, trond.myklebust@primarydata.com, anna.schumaker@netapp.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix suspicious RCU usage in nfs_idmap_get_key. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7959.1475595914.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 04 Oct 2016 16:45:14 +0100 Message-ID: <7960.1475595914@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 04 Oct 2016 15:45:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 523 Lines: 12 Artem Savkov wrote: > nfs_idmap_get_key doesn't hold rkey->sem when calling user_key_payload > resulting in a "suspicious RCU usage" lockdep splat. It does, however hold > rcu_read_lock, so it either needs to use unprotected rcu_dereference, or take > rkey->sem instead of rcu_read_lock. This shouldn't be using rkey->sem. user_key_payload() should do sufficient RCU magic that rcu_read_lock() is sufficient. Can you please include the RCU splat? It's possible user_key_payload() is wrong. David