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 148897 Details for
Bug 230311
[NFSv3] reply size of readdir/readdirplus procedure alaways larger than request
[?]
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 of this bug
nfs3_readdir.patch (text/plain), 1.86 KB, created by
yjwei
on 2007-02-28 06:10:05 UTC
(
hide
)
Description:
patch of this bug
Filename:
MIME Type:
Creator:
yjwei
Created:
2007-02-28 06:10:05 UTC
Size:
1.86 KB
patch
obsolete
>--- linux-2.6.18.i686/fs/nfsd/nfs3proc.c.orig 2007-02-13 01:37:43.000000000 -0500 >+++ linux-2.6.18.i686/fs/nfsd/nfs3proc.c 2007-02-13 13:29:59.000000000 -0500 >@@ -421,6 +421,13 @@ nfsd3_proc_link(struct svc_rqst *rqstp, > } > > /* >+ * The readdir ok reply requires at least (1 + 21)(post_op_attr) >+ * + 2(cookieverf3) + 1(NULL entry ptr) + 1(eof flag) words, >+ * the maximum size of this is limited by count argument >+ */ >+#define NFS3_READDIR_BAGGAGE (1 + 21 + 2 + 1 + 1) >+ >+/* > * Read a portion of a directory. > */ > static int >@@ -433,13 +440,16 @@ nfsd3_proc_readdir(struct svc_rqst *rqst > SVCFH_fmt(&argp->fh), > argp->count, (u32) argp->cookie); > >- /* Make sure we've room for the NULL ptr & eof flag, and shrink to >- * client read size */ >- count = (argp->count >> 2) - 2; >- > /* Read directory and encode entries on the fly */ > fh_copy(&resp->fh, &argp->fh); > >+ /* Make sure we've room for the attr, verf, NULL ptr & eof flag, >+ * and shrink to client read size */ >+ count = (argp->count >> 2) - NFS3_READDIR_BAGGAGE; >+ >+ if(count < 0) >+ RETURN_STATUS(nfserr_toosmall); >+ > resp->buflen = count; > resp->common.err = nfs_ok; > resp->buffer = argp->buffer; >@@ -471,13 +481,16 @@ nfsd3_proc_readdirplus(struct svc_rqst * > SVCFH_fmt(&argp->fh), > argp->count, (u32) argp->cookie); > >- /* Convert byte count to number of words (i.e. >> 2), >- * and reserve room for the NULL ptr & eof flag (-2 words) */ >- resp->count = (argp->count >> 2) - 2; >- > /* Read directory and encode entries on the fly */ > fh_copy(&resp->fh, &argp->fh); > >+ /* Convert byte count to number of words (i.e. >> 2), >+ * and reserve room for the attr, verf, NULL ptr & eof flag */ >+ resp->count = (argp->count >> 2) - NFS3_READDIR_BAGGAGE; >+ >+ if(resp->count < 0) >+ RETURN_STATUS(nfserr_toosmall); >+ > resp->common.err = nfs_ok; > resp->buffer = argp->buffer; > resp->buflen = resp->count;
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 230311
: 148897