Skip to content

Commit

Permalink
[PATCH] cifs: fix rare oops in cifs_close
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve French authored and Linus Torvalds committed Apr 29, 2005
1 parent ad009ac commit cbe0476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
2 changes: 2 additions & 0 deletions fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cbe0476

Please sign in to comment.