Re: [PATCH 3/5] NFS: Never use user credentials for lease renewal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 28, 2013, at 4:02 PM, "Myklebust, Trond" <Trond.Myklebust@xxxxxxxxxx> wrote:

> On Tue, 2013-06-25 at 12:23 -0400, Chuck Lever wrote:
>> Don't try to use a non-UID-0 user credential for lease management,
>> as that credential can change out from under us.  The server will
>> block NFSv4 lease recovery with NFS4ERR_CLID_INUSE.
>> 
>> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
>> ---
>> fs/nfs/nfs4proc.c |    4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index d7ba561..5ba38b3 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -6919,7 +6919,7 @@ static const struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = {
>> 	.recover_open	= nfs4_open_reclaim,
>> 	.recover_lock	= nfs4_lock_reclaim,
>> 	.establish_clid = nfs4_init_clientid,
>> -	.get_clid_cred	= nfs4_get_setclientid_cred,
>> +	.get_clid_cred	= nfs4_get_exchange_id_cred,
>> 	.detect_trunking = nfs40_discover_server_trunking,
>> };
>> 
>> @@ -6942,7 +6942,7 @@ static const struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = {
>> 	.recover_open	= nfs4_open_expired,
>> 	.recover_lock	= nfs4_lock_expired,
>> 	.establish_clid = nfs4_init_clientid,
>> -	.get_clid_cred	= nfs4_get_setclientid_cred,
>> +	.get_clid_cred	= nfs4_get_exchange_id_cred,
>> };
>> 
>> #if defined(CONFIG_NFS_V4_1)
>> 
> 
> Clearly not compile tested...

Yes, it was, with and without NFSV4 enabled.

Do you have a problem to report?

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com




--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux