提交 cbe0476f 编写于 作者: S Steve French 提交者: Linus Torvalds

[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: NLinus Torvalds <torvalds@osdl.org>
上级 ad009ac9
...@@ -6,7 +6,8 @@ Add support for lsattr (getting ext2/ext3/reiserfs attr flags from the server) ...@@ -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 as new protocol extensions. Do not send Get/Set calls for POSIX ACLs
unless server explicitly claims to support them in CIFS Unix extensions unless server explicitly claims to support them in CIFS Unix extensions
POSIX ACL capability bit. Fix packet signing when multiuser mounting with 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 Version 1.31
------------ ------------
......
...@@ -465,8 +465,10 @@ int cifs_close(struct inode *inode, struct file *file) ...@@ -465,8 +465,10 @@ int cifs_close(struct inode *inode, struct file *file)
write_lock(&file->f_owner.lock); write_lock(&file->f_owner.lock);
} }
} }
write_lock(&GlobalSMBSeslock);
list_del(&pSMBFile->flist); list_del(&pSMBFile->flist);
list_del(&pSMBFile->tlist); list_del(&pSMBFile->tlist);
write_unlock(&GlobalSMBSeslock);
write_unlock(&file->f_owner.lock); write_unlock(&file->f_owner.lock);
kfree(pSMBFile->search_resume_name); kfree(pSMBFile->search_resume_name);
kfree(file->private_data); kfree(file->private_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册