Re: [PATCH 07/33] NFS: Ensure that rpc_run_task() errors are propagated back to the caller

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

 



On Tue, 2008-04-22 at 10:19 -0400, Chuck Lever wrote:

> 
> My point is that EFAULT isn't an appropriate return code if  
> rpc_run_task() fails.  EFAULT is appropriate only when the I/O engine  
> can't access the user's memory.
> 
> If no bytes were read, an error code that reflects the problem should  
> be returned.
> 
> 	task = rpc_run_task(&task_setup_data);
> 	if (IS_ERR(task) {
> 		result = PTR_ERR(task);
> 		break;
> 	}
> 	rpc_put_task(task);
> 
> The logic at the end of nfs_direct_read_schedule_segment() will take  
> care to return the number of bytes read, or an error code if no bytes  
> were read.

Then a fix should be applied to auth_gss.c: the EFAULT error message is
coming from the downcall code. If it is not appropriate to pass that on
to the RPC caller, then we should substitute an EACCES.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.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