Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495490

Re: [PATCH] Use proper lock in fscache_objlist_config.

From Artem Savkov <asavkov@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Use proper lock in fscache_objlist_config.
Date 2016-10-04 18:00 +0200
Message-ID <soAil-4L7-9@gated-at.bofh.it> (permalink)
References <soy6R-3iO-15@gated-at.bofh.it> <soA8F-4HM-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Oct 04, 2016 at 04:43:31PM +0100, David Howells wrote:
> Artem Savkov <asavkov@redhat.com> 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?

I didn't see a lockdep report for this one, I just assumed it would be
the same as with the nfs_idmap_get_key case.

-- 
Regards,
  Artem

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] Use proper lock in fscache_objlist_config. Artem Savkov <asavkov@redhat.com> - 2016-10-04 15:40 +0200
  Re: [PATCH] Use proper lock in fscache_objlist_config. David Howells <dhowells@redhat.com> - 2016-10-04 17:50 +0200
    Re: [PATCH] Use proper lock in fscache_objlist_config. Artem Savkov <asavkov@redhat.com> - 2016-10-04 18:00 +0200

csiph-web