Skip to contentSkip to conversation

3.17.x 3.18.x nfs_permission(): put_rpccred() missing?

DISCUSSION Frank van Maarseveen 2 participants 2 messages Dec 21, 2014 – Dec 22, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

Signature · 1 line
Frank
#1 lore raw

Hi Frank,

Quoted 3 lines · Frank van Maarseveen

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

Signature · 5 lines
Trond Myklebust

Linux NFS client maintainer, PrimaryData

[email protected]