2014-12-21 11:49:13

by Frank van Maarseveen

[permalink] [raw]
Subject: 3.17.x 3.18.x nfs_permission(): put_rpccred() missing?

While updating the nfs-ngroups patch for 3.17 and 3.18 I noticed that
nfs_permission() seems to be missing a put_rpccred() call in the non
-ECHILD path.

--
Frank


2014-12-22 16:21:25

by Trond Myklebust

[permalink] [raw]
Subject: Re: 3.17.x 3.18.x nfs_permission(): put_rpccred() missing?

Hi Frank,

On Sun, Dec 21, 2014 at 6:40 AM, Frank van Maarseveen
<[email protected]> wrote:
> While updating the nfs-ngroups patch for 3.17 and 3.18 I noticed that
> nfs_permission() seems to be missing a put_rpccred() call in the non
> -ECHILD path.

I fully agree that it is confusing, but the current code is actually
correct. Please see the changelog for commit bd95608053b7f
(sunrpc/auth: allow lockless (rcu) lookup of credential cache.) which
explains the rules for the RCU-safe credential lookup.

We definitely do want to document this behaviour a little better in
the source. Any takers?

Cheers,
Trond
--
Trond Myklebust

Linux NFS client maintainer, PrimaryData

[email protected]