Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d470070 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (28 commits)
  NFS: Fix a compile glitch on 64-bit systems
  NFS: Clean up nfs_create_request comments
  spkm3: initialize hash
  spkm3: remove bad kfree, unnecessary export
  spkm3: fix spkm3's use of hmac
  NFS4: invalidate cached acl on setacl
  NFS: Fix directory caching problem - with test case and patch.
  NFS: Set meaningful value for fattr->time_start in readdirplus results.
  NFS: Added support to turn off the NFSv3 READDIRPLUS RPC.
  SUNRPC: RPC client should retry with different versions of rpcbind
  SUNRPC: remove old portmapper
  NFS: switch NFSROOT to use new rpcbind client
  SUNRPC: switch the RPC server to use the new rpcbind registration API
  SUNRPC: switch socket-based RPC transports to use rpcbind
  SUNRPC: introduce rpcbind: replacement for in-kernel portmapper
  SUNRPC: Eliminate side effects from rpc_malloc
  SUNRPC: RPC buffer size estimates are too large
  NLM: Shrink the maximum request size of NLM4 requests
  NFS: Use pgoff_t in structures and functions that pass page cache offsets
  NFS: Clean up nfs_sync_mapping_wait()
  ...
parents 7e20ef03 84dde76c
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1734,6 +1734,18 @@ config SUNRPC
config SUNRPC_GSS
	tristate

config SUNRPC_BIND34
	bool "Support for rpcbind versions 3 & 4 (EXPERIMENTAL)"
	depends on SUNRPC && EXPERIMENTAL
	help
	  Provides kernel support for querying rpcbind servers via versions 3
	  and 4 of the rpcbind protocol.  The kernel automatically falls back
	  to version 2 if a remote rpcbind service does not support versions
	  3 or 4.

	  If unsure, say N to get traditional behavior (version 2 rpcbind
	  requests only).

config RPCSEC_GSS_KRB5
	tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
	depends on SUNRPC && EXPERIMENTAL
+4 −6
Original line number Diff line number Diff line
@@ -225,16 +225,13 @@ xdr_decode_stat(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp)
#define SM_monres_sz	2
#define SM_unmonres_sz	1

#ifndef MAX
# define MAX(a, b)	(((a) > (b))? (a) : (b))
#endif

static struct rpc_procinfo	nsm_procedures[] = {
[SM_MON] = {
		.p_proc		= SM_MON,
		.p_encode	= (kxdrproc_t) xdr_encode_mon,
		.p_decode	= (kxdrproc_t) xdr_decode_stat_res,
		.p_bufsiz	= MAX(SM_mon_sz, SM_monres_sz) << 2,
		.p_arglen	= SM_mon_sz,
		.p_replen	= SM_monres_sz,
		.p_statidx	= SM_MON,
		.p_name		= "MONITOR",
	},
@@ -242,7 +239,8 @@ static struct rpc_procinfo nsm_procedures[] = {
		.p_proc		= SM_UNMON,
		.p_encode	= (kxdrproc_t) xdr_encode_unmon,
		.p_decode	= (kxdrproc_t) xdr_decode_stat,
		.p_bufsiz	= MAX(SM_mon_id_sz, SM_unmonres_sz) << 2,
		.p_arglen	= SM_mon_id_sz,
		.p_replen	= SM_unmonres_sz,
		.p_statidx	= SM_UNMON,
		.p_name		= "UNMONITOR",
	},
+10 −10
Original line number Diff line number Diff line
@@ -510,17 +510,20 @@ nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
	return 0;
}

#if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ)
#  error "NLM host name cannot be larger than XDR_MAX_NETOBJ!"
#endif

/*
 * Buffer requirements for NLM
 */
#define NLM_void_sz		0
#define NLM_cookie_sz		1+XDR_QUADLEN(NLM_MAXCOOKIELEN)
#define NLM_caller_sz		1+XDR_QUADLEN(sizeof(utsname()->nodename))
#define NLM_netobj_sz		1+XDR_QUADLEN(XDR_MAX_NETOBJ)
/* #define NLM_owner_sz		1+XDR_QUADLEN(NLM_MAXOWNER) */
#define NLM_caller_sz		1+XDR_QUADLEN(NLMCLNT_OHSIZE)
#define NLM_owner_sz		1+XDR_QUADLEN(NLMCLNT_OHSIZE)
#define NLM_fhandle_sz		1+XDR_QUADLEN(NFS2_FHSIZE)
#define NLM_lock_sz		3+NLM_caller_sz+NLM_netobj_sz+NLM_fhandle_sz
#define NLM_holder_sz		4+NLM_netobj_sz
#define NLM_lock_sz		3+NLM_caller_sz+NLM_owner_sz+NLM_fhandle_sz
#define NLM_holder_sz		4+NLM_owner_sz

#define NLM_testargs_sz		NLM_cookie_sz+1+NLM_lock_sz
#define NLM_lockargs_sz		NLM_cookie_sz+4+NLM_lock_sz
@@ -531,10 +534,6 @@ nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
#define NLM_res_sz		NLM_cookie_sz+1
#define NLM_norep_sz		0

#ifndef MAX
# define MAX(a, b)		(((a) > (b))? (a) : (b))
#endif

/*
 * For NLM, a void procedure really returns nothing
 */
@@ -545,7 +544,8 @@ nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
	.p_proc      = NLMPROC_##proc,					\
	.p_encode    = (kxdrproc_t) nlmclt_encode_##argtype,		\
	.p_decode    = (kxdrproc_t) nlmclt_decode_##restype,		\
	.p_bufsiz    = MAX(NLM_##argtype##_sz, NLM_##restype##_sz) << 2,	\
	.p_arglen    = NLM_##argtype##_sz,				\
	.p_replen    = NLM_##restype##_sz,				\
	.p_statidx   = NLMPROC_##proc,					\
	.p_name      = #proc,						\
	}
+14 −10
Original line number Diff line number Diff line
@@ -516,17 +516,24 @@ nlm4clt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
	return 0;
}

#if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ)
#  error "NLM host name cannot be larger than XDR_MAX_NETOBJ!"
#endif

#if (NLMCLNT_OHSIZE > NLM_MAXSTRLEN)
#  error "NLM host name cannot be larger than NLM's maximum string length!"
#endif

/*
 * Buffer requirements for NLM
 */
#define NLM4_void_sz		0
#define NLM4_cookie_sz		1+XDR_QUADLEN(NLM_MAXCOOKIELEN)
#define NLM4_caller_sz		1+XDR_QUADLEN(NLM_MAXSTRLEN)
#define NLM4_netobj_sz		1+XDR_QUADLEN(XDR_MAX_NETOBJ)
/* #define NLM4_owner_sz		1+XDR_QUADLEN(NLM4_MAXOWNER) */
#define NLM4_caller_sz		1+XDR_QUADLEN(NLMCLNT_OHSIZE)
#define NLM4_owner_sz		1+XDR_QUADLEN(NLMCLNT_OHSIZE)
#define NLM4_fhandle_sz		1+XDR_QUADLEN(NFS3_FHSIZE)
#define NLM4_lock_sz		5+NLM4_caller_sz+NLM4_netobj_sz+NLM4_fhandle_sz
#define NLM4_holder_sz		6+NLM4_netobj_sz
#define NLM4_lock_sz		5+NLM4_caller_sz+NLM4_owner_sz+NLM4_fhandle_sz
#define NLM4_holder_sz		6+NLM4_owner_sz

#define NLM4_testargs_sz	NLM4_cookie_sz+1+NLM4_lock_sz
#define NLM4_lockargs_sz	NLM4_cookie_sz+4+NLM4_lock_sz
@@ -537,10 +544,6 @@ nlm4clt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
#define NLM4_res_sz		NLM4_cookie_sz+1
#define NLM4_norep_sz		0

#ifndef MAX
# define MAX(a,b)		(((a) > (b))? (a) : (b))
#endif

/*
 * For NLM, a void procedure really returns nothing
 */
@@ -551,7 +554,8 @@ nlm4clt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
	.p_proc      = NLMPROC_##proc,					\
	.p_encode    = (kxdrproc_t) nlm4clt_encode_##argtype,		\
	.p_decode    = (kxdrproc_t) nlm4clt_decode_##restype,		\
	.p_bufsiz    = MAX(NLM4_##argtype##_sz, NLM4_##restype##_sz) << 2,	\
	.p_arglen    = NLM4_##argtype##_sz,				\
	.p_replen    = NLM4_##restype##_sz,				\
	.p_statidx   = NLMPROC_##proc,					\
	.p_name      = #proc,						\
	}
+2 −1
Original line number Diff line number Diff line
@@ -618,6 +618,7 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
	if (clp->cl_nfsversion == 3) {
		if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
			server->namelen = NFS3_MAXNAMLEN;
		if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
			server->caps |= NFS_CAP_READDIRPLUS;
	} else {
		if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
Loading