<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;

Fixes the Oops reported by Paul Blazejowski. Bug turned out to be in the
page overflow checking for READDIRPLUS.

Cheers,
  Trond



---

 25-akpm/fs/nfs/nfs3xdr.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN fs/nfs/nfs3xdr.c~nfs-readdirplus-overflow-fix fs/nfs/nfs3xdr.c
--- 25/fs/nfs/nfs3xdr.c~nfs-readdirplus-overflow-fix	Mon Apr  5 14:59:10 2004
+++ 25-akpm/fs/nfs/nfs3xdr.c	Mon Apr  5 14:59:10 2004
@@ -536,16 +536,16 @@ nfs3_xdr_readdirres(struct rpc_rqst *req
 
 		if (res-&gt;plus) {
 			/* post_op_attr */
-			if (p &gt; end)
+			if (p + 2 &gt; end)
 				goto short_pkt;
 			if (*p++) {
 				p += 21;
-				if (p &gt; end)
+				if (p + 1 &gt; end)
 					goto short_pkt;
 			}
 			/* post_op_fh3 */
 			if (*p++) {
-				if (p &gt; end)
+				if (p + 1 &gt; end)
 					goto short_pkt;
 				len = ntohl(*p++);
 				if (len &gt; NFS3_FHSIZE) {

_
</pre></body></html>