diff mbox

[V9fs-developer,fs/9p] Fix NULL point deref in v9fs_dir_release

Message ID 1282065541-3775-1-git-send-email-jvrao@linux.vnet.ibm.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

jvrao Aug. 17, 2010, 5:19 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 16c8a2a..9be9b35 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -290,6 +290,8 @@  int v9fs_dir_release(struct inode *inode, struct file *filp)
 {
 	struct p9_fid *fid;
 
+	if (!filp)
+		return 0;
 	fid = filp->private_data;
 	P9_DPRINTK(P9_DEBUG_VFS,
 			"inode: %p filp: %p fid: %d\n", inode, filp, fid->fid);