Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 153929 Details for
Bug 238687
nfsv3 on krb5i printk's many RPC request reserved XXX but used YYY
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- backport of upstream patch
svc-reserve-auth.patch (text/plain), 3.42 KB, created by
Jeff Layton
on 2007-05-02 10:58:23 UTC
(
hide
)
Description:
patch -- backport of upstream patch
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-05-02 10:58:23 UTC
Size:
3.42 KB
patch
obsolete
>commit 6a1f0f8de95b9caa75e01fc4fb9f75284675e609 >Author: Jeffrey Layton <jlayton@dantu.rdu.redhat.com> >Date: Tue May 1 15:19:47 2007 -0400 > > Fix buffer downsizing in RPC layer to account for checksum [227726] > >diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c >index f61142a..7d47c16 100644 >--- a/fs/nfsd/nfs3proc.c >+++ b/fs/nfsd/nfs3proc.c >@@ -175,7 +175,7 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, > if (NFSSVC_MAXBLKSIZE < resp->count) > resp->count = NFSSVC_MAXBLKSIZE; > >- svc_reserve(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4); >+ svc_reserve_auth(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4); > > fh_copy(&resp->fh, &argp->fh); > nfserr = nfsd_read(rqstp, &resp->fh, NULL, >diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c >index 4e06810..21f2ff7 100644 >--- a/fs/nfsd/nfsproc.c >+++ b/fs/nfsd/nfsproc.c >@@ -154,7 +154,7 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp, > argp->count); > argp->count = NFSSVC_MAXBLKSIZE; > } >- svc_reserve(rqstp, (19<<2) + argp->count + 4); >+ svc_reserve_auth(rqstp, (19<<2) + argp->count + 4); > > resp->count = argp->count; > nfserr = nfsd_read(rqstp, fh_copy(&resp->fh, &argp->fh), NULL, >diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h >index a6de332..d7cf890 100644 >--- a/include/linux/sunrpc/auth.h >+++ b/include/linux/sunrpc/auth.h >@@ -20,9 +20,6 @@ > /* size of the nodename buffer */ > #define UNX_MAXNODENAME 32 > >-/* Maximum size (in bytes) of an rpc credential or verifier */ >-#define RPC_MAX_AUTH_SIZE (400) >- > /* Work around the lack of a VFS credential */ > struct auth_cred { > uid_t uid; >diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h >index f43f237..a519176 100644 >--- a/include/linux/sunrpc/msg_prot.h >+++ b/include/linux/sunrpc/msg_prot.h >@@ -34,6 +34,9 @@ enum rpc_auth_flavors { > RPC_AUTH_GSS_SPKMP = 390011, > }; > >+/* Maximum size (in bytes) of an rpc credential or verifier */ >+#define RPC_MAX_AUTH_SIZE (400) >+ > enum rpc_msg_type { > RPC_CALL = 0, > RPC_REPLY = 1 >diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h >index 94350f5..486abfe 100644 >--- a/include/linux/sunrpc/svc.h >+++ b/include/linux/sunrpc/svc.h >@@ -326,4 +326,23 @@ int svc_register(struct svc_serv *, int, unsigned short); > void svc_wake_up(struct svc_serv *); > void svc_reserve(struct svc_rqst *rqstp, int space); > >+/* >+ * When we want to reduce the size of the reserved space in the response >+ * buffer, we need to take into account the size of any checksum data that >+ * may be at the end of the packet. This is difficult to determine exactly >+ * for all cases without actually generating the checksum, so we just use a >+ * static value. >+ */ >+static inline void >+svc_reserve_auth(struct svc_rqst *rqstp, int space) >+{ >+ int added_space = 0; >+ >+ switch(rqstp->rq_authop->flavour) { >+ case RPC_AUTH_GSS: >+ added_space = RPC_MAX_AUTH_SIZE; >+ } >+ return svc_reserve(rqstp, space + added_space); >+} >+ > #endif /* SUNRPC_SVC_H */ >diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c >index 0aab5b5..2d390d1 100644 >--- a/net/sunrpc/svc.c >+++ b/net/sunrpc/svc.c >@@ -379,7 +379,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) > * better idea of reply size > */ > if (procp->pc_xdrressize) >- svc_reserve(rqstp, procp->pc_xdrressize<<2); >+ svc_reserve_auth(rqstp, procp->pc_xdrressize<<2); > > /* Call the function that processes the request. */ > if (!versp->vs_dispatch) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238687
: 153929