Re: [PATCH v9] vfs_glusterfs: Samba VFS module for glusterfs

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

 



On 5/29/13 5:23 AM, Andrew Bartlett wrote:
On Wed, 2013-05-29 at 07:21 -0400, Anand Avati wrote:
Implement a Samba VFS plugin for glusterfs based on gluster's gfapi.
This is a "bottom" vfs plugin (not something to be stacked on top of
another module), and translates (most) calls into closest actions
on gfapi.

Reviewed-by: Andrew Bartlett <abartlet@xxxxxxxxx>
Signed-off-by: Anand Avati <avati@xxxxxxxxxx>

Thanks.  If nobody else pushes this to master by tomorrow, I'll handle
it then.

Thank you for your patience!

Andrew Bartlett


We just uncovered this issue in our QE testing -

On Wed, May 29, 2013 at 4:21 AM, Anand Avati <avati@xxxxxxxxxx> wrote:
+static DIR *vfs_gluster_fdopendir(struct vfs_handle_struct *handle,
+                                 files_struct *fsp, const char *mask,
+                                 uint32 attributes)
+{
+       return (DIR *) glfd_fd_get(fsp->fh->fd);
+}

When code takes this vfs_fdopendir() path (happened when testing fsstress, most of the times vfs_opendir() is called - not sure why), we are just passing a pointer of glfs_fd structure ...

+static int vfs_gluster_closedir(struct vfs_handle_struct *handle, DIR *dirp)
+{
+       return glfs_closedir((void *)dirp);
+}

... and Samba does a vfs_closedir() _and_ vfs_close(), essentially doing a double free on the glfs_fd structure.

I am sending out a v10 patch which fixes this by doing a glfs_dup() in vfs_fdopendir().

Avati



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux