diff mbox

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

Message ID 1282529312-11861-1-git-send-email-jvrao@linux.vnet.ibm.com (mailing list archive)
State Rejected, archived
Delegated to: Eric Van Hensbergen
Headers show

Commit Message

jvrao Aug. 23, 2010, 2:08 a.m. UTC
None
diff mbox

Patch

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