1. 01 Jul, 2015 25 commits
  2. 12 Apr, 2015 2 commits
  3. 26 Mar, 2015 1 commit
  4. 19 Mar, 2015 1 commit
    • Tom Van Braeckel's avatar
      fuse: explicitly set /dev/fuse file's private_data · 94e4fe2c
      Tom Van Braeckel authored
      The misc subsystem (which is used for /dev/fuse) initializes private_data to
      point to the misc device when a driver has registered a custom open file
      operation, and initializes it to NULL when a custom open file operation has
      *not* been provided.
      This subtle quirk is confusing, to the point where kernel code registers
      *empty* file open operations to have private_data point to the misc device
      structure. And it leads to bugs, where the addition or removal of a custom open
      file operation surprisingly changes the initial contents of a file's
      private_data structure.
      So to simplify things in the misc subsystem, a patch [1] has been proposed to
      *always* set the private_data to point to the misc device, instead of only
      doing this when a custom open file operation has been registered.
      But before this patch can be applied we need to modify drivers that make the
      assumption that a misc device file's private_data is initialized to NULL
      because they didn't register a custom open file operation, so they don't rely
      on this assumption anymore. FUSE uses private_data to store the fuse_conn and
      errors out if this is not initialized to NULL at mount time.
      Hence, we now set a file's private_data to NULL explicitly, to be independent
      of whatever value the misc subsystem initializes it to by default.
      [1] https://lkml.org/lkml/2014/12/4/939
      Reported-by: default avatarGiedrius Statkevicius <giedriuswork@gmail.com>
      Reported-by: default avatarThierry Reding <thierry.reding@gmail.com>
      Signed-off-by: default avatarTom Van Braeckel <tomvanbraeckel@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
  5. 26 Feb, 2015 2 commits
  6. 06 Jan, 2015 2 commits
    • Miklos Szeredi's avatar
      fuse: add memory barrier to INIT · 9759bd51
      Miklos Szeredi authored
      Theoretically we need to order setting of various fields in fc with
      No known bug reports related to this yet.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    • Miklos Szeredi's avatar
      fuse: fix LOOKUP vs INIT compat handling · 21f62174
      Miklos Szeredi authored
      Analysis from Marc:
       "Commit 7078187a
       ("fuse: introduce fuse_simple_request() helper")
        from the above pull request triggers some EIO errors for me in some tests
        that rely on fuse
        Looking at the code changes and a bit of debugging info I think there's a
        general problem here that fuse_get_req checks and possibly waits for
        fc->initialized, and this was always called first.  But this commit
        changes the ordering and in many places fc->minor is now possibly used
        before fuse_get_req, and we can't be sure that fc has been initialized.
        In my case fuse_lookup_init sets req->out.args[0].size to the wrong size
        because fc->minor at that point is still 0, leading to the EIO error."
      Fix by moving the compat adjustments into fuse_simple_request() to after
      This is also more readable than the original, since now compatibility is
      handled in a single function instead of cluttering each operation.
      Reported-by: default avatarMarc Dionne <marc.c.dionne@gmail.com>
      Tested-by: default avatarMarc Dionne <marc.c.dionne@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Fixes: 7078187a ("fuse: introduce fuse_simple_request() helper")
  7. 12 Dec, 2014 1 commit
    • Miklos Szeredi's avatar
      fuse: introduce fuse_simple_request() helper · 7078187a
      Miklos Szeredi authored
      The following pattern is repeated many times:
      	req = fuse_get_req_nopages(fc);
      	/* Initialize req->(in|out).args */
      	fuse_request_send(fc, req);
      	err = req->out.h.error;
      Create a new replacement helper:
      	/* Initialize args */
      	err = fuse_simple_request(fc, &args);
      In addition to reducing the code size, this will ease moving from the
      complex arg-based to a simpler page-based I/O on the fuse device.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
  8. 07 Jul, 2014 1 commit
    • Miklos Szeredi's avatar
      fuse: avoid scheduling while atomic · c55a01d3
      Miklos Szeredi authored
      As reported by Richard Sharpe, an attempt to use fuse_notify_inval_entry()
      triggers complains about scheduling while atomic:
        BUG: scheduling while atomic: fuse.hf/13976/0x10000001
      This happens because fuse_notify_inval_entry() attempts to allocate memory
      with GFP_KERNEL, holding "struct fuse_copy_state" mapped by kmap_atomic().
      Introduced by commit 58bda1da
       "fuse/dev: use atomic maps"
      Fix by moving the map/unmap to just cover the actual memcpy operation.
      Original patch from Maxim Patlasov <mpatlasov@parallels.com>
      Reported-by: default avatarRichard Sharpe <realrichardsharpe@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: <stable@vger.kernel.org> # v3.15+
  9. 04 Jun, 2014 1 commit
  10. 02 Apr, 2014 2 commits
  11. 22 Jan, 2014 2 commits