Re: [PATCH] [fs/9p] Check for NULL fid in v9fs_dir_release()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Aug 2010 09:26:21 -0700, "Venkateswararao Jujjuri (JV)" <jvrao@xxxxxxxxxxxxxxxxxx> wrote:
> NULL fid should be handled in cases where we endup calling v9fs_dir_release()
> before even we instantiate the fid in filp.
> 
> Signed-off-by: Venkateswararao Jujjuri <jvrao@xxxxxxxxxxxxxxxxxx>
> ---
>  fs/9p/vfs_dir.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
> index 16c8a2a..899f168 100644
> --- a/fs/9p/vfs_dir.c
> +++ b/fs/9p/vfs_dir.c
> @@ -292,9 +292,11 @@ int v9fs_dir_release(struct inode *inode, struct file *filp)
> 
>  	fid = filp->private_data;
>  	P9_DPRINTK(P9_DEBUG_VFS,
> -			"inode: %p filp: %p fid: %d\n", inode, filp, fid->fid);
> +			"v9fs_dir_release: inode: %p filp: %p fid: %d\n",
> +			inode, filp, fid ? fid->fid : -1);
>  	filemap_write_and_wait(inode->i_mapping);
> -	p9_client_clunk(fid);
> +	if (fid)
> +		p9_client_clunk(fid);
>  	return 0;
>  }
> 

Can you get a stack trace where we end up calling dir_release with null
fid

-aneesh
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux