diff options
author | Nick Wilson <njw@osdl.org> | 2005-09-23 00:44:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-23 01:17:37 -0400 |
commit | 10d2c46f9408d404bffef89d5052953a3b1d9288 (patch) | |
tree | 5eace052aa3b694d9e1e8a523bf66641e0c51966 /fs | |
parent | f7b3a4359b25311fb5894c8809478a2df6bed480 (diff) |
[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 <njw@osdl.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/read.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 6ceb1d471f20..9758ebd49905 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -184,14 +184,13 @@ static void nfs_readpage_release(struct nfs_page *req) | |||
184 | { | 184 | { |
185 | unlock_page(req->wb_page); | 185 | unlock_page(req->wb_page); |
186 | 186 | ||
187 | nfs_clear_request(req); | ||
188 | nfs_release_request(req); | ||
189 | |||
190 | dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", | 187 | dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", |
191 | req->wb_context->dentry->d_inode->i_sb->s_id, | 188 | req->wb_context->dentry->d_inode->i_sb->s_id, |
192 | (long long)NFS_FILEID(req->wb_context->dentry->d_inode), | 189 | (long long)NFS_FILEID(req->wb_context->dentry->d_inode), |
193 | req->wb_bytes, | 190 | req->wb_bytes, |
194 | (long long)req_offset(req)); | 191 | (long long)req_offset(req)); |
192 | nfs_clear_request(req); | ||
193 | nfs_release_request(req); | ||
195 | } | 194 | } |
196 | 195 | ||
197 | /* | 196 | /* |