aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-28 22:41:05 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-28 22:41:05 -0700
commitcbe0476fa6a76b01b79e7c117963d45ed0a28758 (patch)
treee45a78777f977ba4670e7419bfdcde8a1429ceee
parentad009ac96509e005d9978d0ae9e9ec4d63ad2990 (diff)
downloadkernel_goldelico_gta04-cbe0476fa6a76b01b79e7c117963d45ed0a28758.zip
kernel_goldelico_gta04-cbe0476fa6a76b01b79e7c117963d45ed0a28758.tar.gz
kernel_goldelico_gta04-cbe0476fa6a76b01b79e7c117963d45ed0a28758.tar.bz2
[PATCH] cifs: fix rare oops in cifs_close
Protect access to cifs file list in cifs_close path Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/cifs/CHANGES3
-rw-r--r--fs/cifs/file.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 43b3119..ce16b0a 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -6,7 +6,8 @@ Add support for lsattr (getting ext2/ext3/reiserfs attr flags from the server)
as new protocol extensions. Do not send Get/Set calls for POSIX ACLs
unless server explicitly claims to support them in CIFS Unix extensions
POSIX ACL capability bit. Fix packet signing when multiuser mounting with
-different users from the same client to the same server.
+different users from the same client to the same server. Fix oops in
+cifs_close.
Version 1.31
------------
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index dcab7cf..9c77550 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -465,8 +465,10 @@ int cifs_close(struct inode *inode, struct file *file)
write_lock(&file->f_owner.lock);
}
}
+ write_lock(&GlobalSMBSeslock);
list_del(&pSMBFile->flist);
list_del(&pSMBFile->tlist);
+ write_unlock(&GlobalSMBSeslock);
write_unlock(&file->f_owner.lock);
kfree(pSMBFile->search_resume_name);
kfree(file->private_data);