Re: [PATCH] Use proper lock in fscache_objlist_config.

From: David Howells
Date: Tue Oct 04 2016 - 11:43:42 EST


Artem Savkov <asavkov@xxxxxxxxxx> 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