<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/fuse/file.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-02-20T09:09:05Z</updated>
<entry>
<title>fuse: decrement NR_WRITEBACK_TEMP on the right page</title>
<updated>2019-02-20T09:09:05Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2019-01-16T09:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5791673ddc33134cc4dd57eddd014e41f1d1329c'/>
<id>urn:sha1:5791673ddc33134cc4dd57eddd014e41f1d1329c</id>
<content type='text'>
commit a2ebba824106dabe79937a9f29a875f837e1b6d4 upstream.

NR_WRITEBACK_TEMP is accounted on the temporary page in the request, not
the page cache page.

Fixes: 8b284dc47291 ("fuse: writepages: handle same page rewrites")
Cc: &lt;stable@vger.kernel.org&gt; # v3.13
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: Add missed unlock_page() to fuse_readpages_fill()</title>
<updated>2018-09-05T07:16:23Z</updated>
<author>
<name>Kirill Tkhai</name>
</author>
<published>2018-07-19T12:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0dd67c762f650aae847260ddda8ffcaf15c477d'/>
<id>urn:sha1:e0dd67c762f650aae847260ddda8ffcaf15c477d</id>
<content type='text'>
commit 109728ccc5933151c68d1106e4065478a487a323 upstream.

The above error path returns with page unlocked, so this place seems also
to behave the same.

Fixes: f8dbdf81821b ("fuse: rework fuse_readpages()")
Signed-off-by: Kirill Tkhai &lt;ktkhai@virtuozzo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: initialize the flock flag in fuse_file on allocation</title>
<updated>2017-08-16T20:35:30Z</updated>
<author>
<name>Mateusz Jurczyk</name>
</author>
<published>2017-06-07T10:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bba1b1b9fa1b4c8b95caafa84acb8634bbaddd0'/>
<id>urn:sha1:9bba1b1b9fa1b4c8b95caafa84acb8634bbaddd0</id>
<content type='text'>
commit 68227c03cba84a24faf8a7277d2b1a03c8959c2c upstream.

Before the patch, the flock flag could remain uninitialized for the
lifespan of the fuse_file allocation. Unless set to true in
fuse_file_flock(), it would remain in an indeterminate state until read in
an if statement in fuse_release_common(). This could consequently lead to
taking an unexpected branch in the code.

The bug was discovered by a runtime instrumentation designed to detect use
of uninitialized memory in the kernel.

Signed-off-by: Mateusz Jurczyk &lt;mjurczyk@google.com&gt;
Fixes: 37fb3a30b462 ("fuse: fix flock")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: Propagate dentry down to inode_change_ok()</title>
<updated>2016-12-23T14:42:19Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-12-14T12:24:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33b52836b538a87686c80fa504ae538b6dd15e65'/>
<id>urn:sha1:33b52836b538a87686c80fa504ae538b6dd15e65</id>
<content type='text'>
[ Upstream commit 62490330769c1ce5dcba3f1f3e8f4005e9b797e6 ]

To avoid clearing of capabilities or security related extended
attributes too early, inode_change_ok() will need to take dentry instead
of inode. Propagate it down to fuse_do_setattr().

Acked-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>fuse: fuse_flush must check mapping-&gt;flags for errors</title>
<updated>2016-08-22T16:23:23Z</updated>
<author>
<name>Maxim Patlasov</name>
</author>
<published>2016-07-20T01:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8f8b0f516d4de7bcbf2e551a254ed73f2452c6d'/>
<id>urn:sha1:a8f8b0f516d4de7bcbf2e551a254ed73f2452c6d</id>
<content type='text'>
[ Upstream commit 9ebce595f63a407c5cec98f98f9da8459b73740a ]

fuse_flush() calls write_inode_now() that triggers writeback, but actual
writeback will happen later, on fuse_sync_writes(). If an error happens,
fuse_writepage_end() will set error bit in mapping-&gt;flags. So, we have to
check mapping-&gt;flags after fuse_sync_writes().

Signed-off-by: Maxim Patlasov &lt;mpatlasov@virtuozzo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on")
Cc: &lt;stable@vger.kernel.org&gt; # v3.15+
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>fuse: fsync() did not return IO errors</title>
<updated>2016-08-22T16:23:22Z</updated>
<author>
<name>Alexey Kuznetsov</name>
</author>
<published>2016-07-19T19:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=689c2a8941d452a3054868afa03497b64853e29b'/>
<id>urn:sha1:689c2a8941d452a3054868afa03497b64853e29b</id>
<content type='text'>
[ Upstream commit ac7f052b9e1534c8248f814b6f0068ad8d4a06d2 ]

Due to implementation of fuse writeback filemap_write_and_wait_range() does
not catch errors. We have to do this directly after fuse_sync_writes()

Signed-off-by: Alexey Kuznetsov &lt;kuznet@virtuozzo.com&gt;
Signed-off-by: Maxim Patlasov &lt;mpatlasov@virtuozzo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on")
Cc: &lt;stable@vger.kernel.org&gt; # v3.15+
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>fuse: break infinite loop in fuse_fill_write_pages()</title>
<updated>2016-04-12T13:09:42Z</updated>
<author>
<name>Roman Gushchin</name>
</author>
<published>2015-10-12T13:33:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d48d21de5e8054d38360e09d5f16508c0a17dd62'/>
<id>urn:sha1:d48d21de5e8054d38360e09d5f16508c0a17dd62</id>
<content type='text'>
[ Upstream commit 3ca8138f014a913f98e6ef40e939868e1e9ea876 ]

I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.

Fix this by calling iov_iter_advance() before repeating an attempt to
copy data from userspace.

A similar problem is described in 124d3b7041f ("fix writev regression:
pan hanging unkillable and un-straceable"). If zero-length segmend
is followed by segment with invalid address,
iov_iter_fault_in_readable() checks only first segment (zero-length),
iov_iter_copy_from_user_atomic() skips it, fails at second and
returns zero -&gt; goto again without skipping zero-length segment.

Patch calls iov_iter_advance() before goto again: we'll skip zero-length
segment at second iteraction and iov_iter_fault_in_readable() will detect
invalid address.

Special thanks to Konstantin Khlebnikov, who helped a lot with the commit
description.

Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Maxim Patlasov &lt;mpatlasov@parallels.com&gt;
Cc: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: Roman Gushchin &lt;klamm@yandex-team.ru&gt;
Signed-off-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Fixes: ea9b9907b82a ("fuse: implement perform_write")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>fuse: honour max_read and max_write in direct_io mode</title>
<updated>2014-09-27T01:16:51Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2014-09-24T15:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c80929c4c4d54e568b07ab85877d5fd38f4b02f'/>
<id>urn:sha1:2c80929c4c4d54e568b07ab85877d5fd38f4b02f</id>
<content type='text'>
The third argument of fuse_get_user_pages() "nbytesp" refers to the number of
bytes a caller asked to pack into fuse request. This value may be lesser
than capacity of fuse request or iov_iter.  So fuse_get_user_pages() must
ensure that *nbytesp won't grow.

Now, when helper iov_iter_get_pages() performs all hard work of extracting
pages from iov_iter, it can be done by passing properly calculated
"maxsize" to the helper.

The other caller of iov_iter_get_pages() (dio_refill_pages()) doesn't need
this capability, so pass LONG_MAX as the maxsize argument here.

Fixes: c9c37e2e6378 ("fuse: switch to iov_iter_get_pages()")
Reported-by: Werner Baumann &lt;werner.baumann@onlinehome.de&gt;
Tested-by: Maxim Patlasov &lt;mpatlasov@parallels.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch iov_iter_get_pages() to passing maximal number of pages</title>
<updated>2014-08-07T18:40:11Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-06-19T00:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7f3888ad7f0932a87fb76e6e4edff2a90cc7920'/>
<id>urn:sha1:c7f3888ad7f0932a87fb76e6e4edff2a90cc7920</id>
<content type='text'>
... instead of maximal size.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&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>
</author>
<published>2014-07-15T15:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</feed>
