From: Nick Wilson Date: Fri, 23 Sep 2005 04:44:28 +0000 (-0700) Subject: [PATCH] NFS: fix client oops when debugging is on X-Git-Tag: v2.6.14-rc3~51^2~26 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=10d2c46f9408d404bffef89d5052953a3b1d9288;p=linux-2.6-omap-h63xx.git [PATCH] NFS: fix client oops when debugging is on nfs_readpage_release() causes an oops while accessing a file with NFS debugging turned on (echo 32767 > /proc/sys/sunrpc/nfs_debug) and a kernel built with CONFIG_DEBUG_SLAB. This patch moves the debugging statement above nfs_release_request() to avoid accessing freed memory. Signed-off-by: Nick Wilson Cc: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 6ceb1d471f2..9758ebd4990 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -184,14 +184,13 @@ static void nfs_readpage_release(struct nfs_page *req) { unlock_page(req->wb_page); - nfs_clear_request(req); - nfs_release_request(req); - dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", req->wb_context->dentry->d_inode->i_sb->s_id, (long long)NFS_FILEID(req->wb_context->dentry->d_inode), req->wb_bytes, (long long)req_offset(req)); + nfs_clear_request(req); + nfs_release_request(req); } /*