android_kernel_samsung_msm8976/fs/nfsd
David Howells 033a666ccb NFSD: Don't hold unrefcounted creds over call to nfsd_setuser()
nfsd_open() gets an unrefcounted pointer to the current process's effective
credentials at the top of the function, then calls nfsd_setuser() via
fh_verify() - which may replace and destroy the current process's effective
credentials - and then passes the unrefcounted pointer to dentry_open() - but
the credentials may have been destroyed by this point.

Instead, the value from current_cred() should be passed directly to
dentry_open() as one of its arguments, rather than being cached in a variable.

Possibly fh_verify() should return the creds to use.

This is a regression introduced by
745ca2475a "CRED: Pass credentials through
dentry_open()".

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-and-Verified-By: Steve Dickson <steved@redhat.com>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-07-03 10:21:10 -04:00
..
auth.c
auth.h
export.c
Kconfig
lockd.c
Makefile
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c
nfs4acl.c
nfs4callback.c
nfs4idmap.c
nfs4proc.c
nfs4recover.c
nfs4state.c
nfs4xdr.c
nfscache.c
nfsctl.c
nfsfh.c
nfsproc.c
nfssvc.c
nfsxdr.c
stats.c
vfs.c NFSD: Don't hold unrefcounted creds over call to nfsd_setuser() 2009-07-03 10:21:10 -04:00