<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fuse/dev.c, branch v4.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-03-19T14:29:22Z</updated>
<entry>
<title>fuse: explicitly set /dev/fuse file's private_data</title>
<updated>2015-03-19T14:29:22Z</updated>
<author>
<name>Tom Van Braeckel</name>
<email>tomvanbraeckel@gmail.com</email>
</author>
<published>2015-01-12T04:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94e4fe2cab3d43b3ba7c3f721743006a8c9d913a'/>
<id>urn:sha1:94e4fe2cab3d43b3ba7c3f721743006a8c9d913a</id>
<content type='text'>
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: Giedrius Statkevicius &lt;giedriuswork@gmail.com&gt;
Reported-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Signed-off-by: Tom Van Braeckel &lt;tomvanbraeckel@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: set stolen page uptodate</title>
<updated>2015-02-26T10:45:47Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-02-26T10:45:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa991b3b267e24f578bac7b09cc57579b660304b'/>
<id>urn:sha1:aa991b3b267e24f578bac7b09cc57579b660304b</id>
<content type='text'>
Regular pipe buffers' -&gt;steal method (generic_pipe_buf_steal()) doesn't set
PG_uptodate.

Don't warn on this condition, just set the uptodate flag.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>fuse: notify: don't move pages</title>
<updated>2015-02-26T10:45:47Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-02-26T10:45:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d2783626a53d4c922f82d51fa675cb5d13f0d36'/>
<id>urn:sha1:0d2783626a53d4c922f82d51fa675cb5d13f0d36</id>
<content type='text'>
fuse_try_move_page() is not prepared for replacing pages that have already
been read.

Reported-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>fuse: add memory barrier to INIT</title>
<updated>2015-01-06T09:45:35Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-01-06T09:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9759bd51899458af4f4bcc11046f01285642ca10'/>
<id>urn:sha1:9759bd51899458af4f4bcc11046f01285642ca10</id>
<content type='text'>
Theoretically we need to order setting of various fields in fc with
fc-&gt;initialized.

No known bug reports related to this yet.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: fix LOOKUP vs INIT compat handling</title>
<updated>2015-01-06T09:45:35Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-01-06T09:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21f621741a770c119e7529a3f5c0e6b7c91383a3'/>
<id>urn:sha1:21f621741a770c119e7529a3f5c0e6b7c91383a3</id>
<content type='text'>
Analysis from Marc:

 "Commit 7078187a795f ("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-&gt;initialized, and this was always called first.  But this commit
  changes the ordering and in many places fc-&gt;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-&gt;out.args[0].size to the wrong size
  because fc-&gt;minor at that point is still 0, leading to the EIO error."

Fix by moving the compat adjustments into fuse_simple_request() to after
fuse_get_req().

This is also more readable than the original, since now compatibility is
handled in a single function instead of cluttering each operation.

Reported-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
Tested-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Fixes: 7078187a795f ("fuse: introduce fuse_simple_request() helper")
</content>
</entry>
<entry>
<title>fuse: introduce fuse_simple_request() helper</title>
<updated>2014-12-12T08:49:05Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-12-12T08:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7078187a795f862465325bcadf3070867c0cb5f8'/>
<id>urn:sha1:7078187a795f862465325bcadf3070867c0cb5f8</id>
<content type='text'>
The following pattern is repeated many times:

	req = fuse_get_req_nopages(fc);
	/* Initialize req-&gt;(in|out).args */
	fuse_request_send(fc, req);
	err = req-&gt;out.h.error;
	fuse_put_request(req);

Create a new replacement helper:

	/* Initialize args */
	err = fuse_simple_request(fc, &amp;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: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse</title>
<updated>2014-07-15T15:57:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-07-15T15:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b632204c704e3f8c742153f4a4f72348a848c17'/>
<id>urn:sha1:0b632204c704e3f8c742153f4a4f72348a848c17</id>
<content type='text'>
Pull fuse fixes from Miklos Szeredi:
 "This contains miscellaneous fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: replace count*size kzalloc by kcalloc
  fuse: release temporary page if fuse_writepage_locked() failed
  fuse: restructure -&gt;rename2()
  fuse: avoid scheduling while atomic
  fuse: handle large user and group ID
  fuse: inode: drop cast
  fuse: ignore entry-timeout on LOOKUP_REVAL
  fuse: timeout comparison fix
</content>
</entry>
<entry>
<title>fuse: avoid scheduling while atomic</title>
<updated>2014-07-07T13:28:51Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-07-07T13:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c55a01d360afafcd52bc405c044a6ebf5de436d5'/>
<id>urn:sha1:c55a01d360afafcd52bc405c044a6ebf5de436d5</id>
<content type='text'>
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 58bda1da4b3c "fuse/dev: use atomic maps"

Fix by moving the map/unmap to just cover the actual memcpy operation.

Original patch from Maxim Patlasov &lt;mpatlasov@parallels.com&gt;

Reported-by: Richard Sharpe &lt;realrichardsharpe@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.15+
</content>
</entry>
<entry>
<title>mm: page_alloc: convert hot/cold parameter and immediate callers to bool</title>
<updated>2014-06-04T23:54:09Z</updated>
<author>
<name>Mel Gorman</name>
<email>mgorman@suse.de</email>
</author>
<published>2014-06-04T23:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b745bc85f21ea707e4ea1a91948055fa3e72c77b'/>
<id>urn:sha1:b745bc85f21ea707e4ea1a91948055fa3e72c77b</id>
<content type='text'>
cold is a bool, make it one.  Make the likely case the "if" part of the
block instead of the else as according to the optimisation manual this is
preferred.

Signed-off-by: Mel Gorman &lt;mgorman@suse.de&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Michal Hocko &lt;mhocko@suse.cz&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Dave Hansen &lt;dave.hansen@intel.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pipe: kill -&gt;map() and -&gt;unmap()</title>
<updated>2014-04-02T03:19:19Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-02-03T02:09:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbb32750a62df75d1ffea547f3908b21c5496d9f'/>
<id>urn:sha1:fbb32750a62df75d1ffea547f3908b21c5496d9f</id>
<content type='text'>
all pipe_buffer_operations have the same instances of those...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
