mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
NLM: Shrink the maximum request size of NLM4 requests
NLM version 4 requests estimate the call and reply header sizes rather conservatively, using the very maximum size allowed in the protocol even though Linux always uses only a small fraction of the allowable space. Reduce the size of caller and lock arguments to conserve RPC buffer space while XDR encoding NLM4 arguments. Add compile-time checks to ensure the hostname string won't overflow NLM protocol maximums. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
ca52fec152
commit
511d2e8855
3 changed files with 21 additions and 11 deletions
|
@ -88,7 +88,7 @@ struct nlm_wait;
|
|||
/*
|
||||
* Memory chunk for NLM client RPC request.
|
||||
*/
|
||||
#define NLMCLNT_OHSIZE (sizeof(utsname()->nodename)+10)
|
||||
#define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u)
|
||||
struct nlm_rqst {
|
||||
unsigned int a_flags; /* initial RPC task flags */
|
||||
struct nlm_host * a_host; /* host handle */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue