[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A4CBD4E.90802@RedHat.com>
Date: Thu, 02 Jul 2009 09:59:42 -0400
From: Steve Dickson <SteveD@...hat.com>
To: David Howells <dhowells@...hat.com>
CC: bfields@...ldses.org, rasmus@...onsult.dk,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFSD: Don't hold unrefcounted creds over call to nfsd_setuser()
On 07/02/2009 09:35 AM, David Howells wrote:
> 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.
>
> Signed-off-by: David Howells <dhowells@...hat.com>
Tested-and-Verified-By: Steve Dickson <steved@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists