aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-29 01:41:05 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-29 01:41:05 -0400
commitcbe0476fa6a76b01b79e7c117963d45ed0a28758 (patch)
treee45a78777f977ba4670e7419bfdcde8a1429ceee /fs/cifs/file.c
parentad009ac96509e005d9978d0ae9e9ec4d63ad2990 (diff)
[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>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index dcab7cf1b53b..9c7755053099 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -465,8 +465,10 @@ int cifs_close(struct inode *inode, struct file *file)
465 write_lock(&file->f_owner.lock); 465 write_lock(&file->f_owner.lock);
466 } 466 }
467 } 467 }
468 write_lock(&GlobalSMBSeslock);
468 list_del(&pSMBFile->flist); 469 list_del(&pSMBFile->flist);
469 list_del(&pSMBFile->tlist); 470 list_del(&pSMBFile->tlist);
471 write_unlock(&GlobalSMBSeslock);
470 write_unlock(&file->f_owner.lock); 472 write_unlock(&file->f_owner.lock);
471 kfree(pSMBFile->search_resume_name); 473 kfree(pSMBFile->search_resume_name);
472 kfree(file->private_data); 474 kfree(file->private_data);