<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v5.2</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=v5.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-07-06T16:53:08Z</updated>
<entry>
<title>Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2019-07-06T16:53:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-06T16:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ceacbc0e145e3b27d8b12eecb881f9d87702765a'/>
<id>urn:sha1:ceacbc0e145e3b27d8b12eecb881f9d87702765a</id>
<content type='text'>
Pull vfs fixlet from Al Viro:
 "Fix bogus default y in Kconfig (VALIDATE_FS_PARSER)

  That thing should not be turned on by default, especially since it's
  not quiet in case it finds no problems. Geert has sent the obvious fix
  quite a few times, but it fell through the cracks"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fs: VALIDATE_FS_PARSER should default to n
</content>
</entry>
<entry>
<title>Merge tag 'nfsd-5.2-2' of git://linux-nfs.org/~bfields/linux</title>
<updated>2019-07-06T02:00:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-06T02:00:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8f46b5afe1c0a83c3013a339e6aeccc2f37342d'/>
<id>urn:sha1:a8f46b5afe1c0a83c3013a339e6aeccc2f37342d</id>
<content type='text'>
Pull nfsd fixes from Bruce Fields:
 "Two more quick bugfixes for nfsd: fixing a regression causing mount
  failures on high-memory machines and fixing the DRC over RDMA"

* tag 'nfsd-5.2-2' of git://linux-nfs.org/~bfields/linux:
  nfsd: Fix overflow causing non-working mounts on 1 TB machines
  svcrdma: Ignore source port when computing DRC hash
</content>
</entry>
<entry>
<title>fs: VALIDATE_FS_PARSER should default to n</title>
<updated>2019-07-05T15:22:11Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2019-04-01T11:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75f2d86b20bf6aec0392d6dd2ae3ffff26d2ae0e'/>
<id>urn:sha1:75f2d86b20bf6aec0392d6dd2ae3ffff26d2ae0e</id>
<content type='text'>
CONFIG_VALIDATE_FS_PARSER is a debugging tool to check that the parser
tables are vaguely sane.  It was set to default to 'Y' for the moment to
catch errors in upcoming fs conversion development.

Make sure it is not enabled by default in the final release of v5.1.

Fixes: 31d921c7fb969172 ("vfs: Add configuration parser helpers")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'akpm' (patches from Andrew)</title>
<updated>2019-07-05T02:39:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-05T02:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5fff14a0c7989fbc8316a43f52aed1804f02ddd'/>
<id>urn:sha1:a5fff14a0c7989fbc8316a43f52aed1804f02ddd</id>
<content type='text'>
Merge more fixes from Andrew Morton:
 "5 fixes"

* emailed patches from Andrew Morton &lt;akpm@linux-foundation.org&gt;:
  swap_readpage(): avoid blk_wake_io_task() if !synchronous
  devres: allow const resource arguments
  mm/vmscan.c: prevent useless kswapd loops
  fs/userfaultfd.c: disable irqs for fault_pending and event locks
  mm/page_alloc.c: fix regression with deferred struct page init
</content>
</entry>
<entry>
<title>Merge tag 'dax-fix-5.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm</title>
<updated>2019-07-05T02:32:11Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-05T02:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cde357c392e93aa7fcfc019403e0d1792081d634'/>
<id>urn:sha1:cde357c392e93aa7fcfc019403e0d1792081d634</id>
<content type='text'>
Pull dax fix from Dan Williams:
 "A single dax fix that has been soaking awaiting other fixes under
  discussion to join it. As it is getting late in the cycle lets proceed
  with this fix and save follow-on changes for post-v5.3-rc1.

   - Fix xarray entry association for mixed mappings"

* tag 'dax-fix-5.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  dax: Fix xarray entry association for mixed mappings
</content>
</entry>
<entry>
<title>Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2019-07-05T02:21:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-05T02:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2cd7cdc7e420a343743db781484e801fd784a1f1'/>
<id>urn:sha1:2cd7cdc7e420a343743db781484e801fd784a1f1</id>
<content type='text'>
Pull do_move_mount() fix from Al Viro:
 "Regression fix"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  vfs: move_mount: reject moving kernel internal mounts
</content>
</entry>
<entry>
<title>fs/userfaultfd.c: disable irqs for fault_pending and event locks</title>
<updated>2019-07-05T02:12:07Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-07-04T22:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cbcfa130a911c613a1d9d921af2eea171c414172'/>
<id>urn:sha1:cbcfa130a911c613a1d9d921af2eea171c414172</id>
<content type='text'>
When IOCB_CMD_POLL is used on a userfaultfd, aio_poll() disables IRQs
and takes kioctx::ctx_lock, then userfaultfd_ctx::fd_wqh.lock.

This may have to wait for userfaultfd_ctx::fd_wqh.lock to be released by
userfaultfd_ctx_read(), which in turn can be waiting for
userfaultfd_ctx::fault_pending_wqh.lock or
userfaultfd_ctx::event_wqh.lock.

But elsewhere the fault_pending_wqh and event_wqh locks are taken with
IRQs enabled.  Since the IRQ handler may take kioctx::ctx_lock, lockdep
reports that a deadlock is possible.

Fix it by always disabling IRQs when taking the fault_pending_wqh and
event_wqh locks.

Commit ae62c16e105a ("userfaultfd: disable irqs when taking the
waitqueue lock") didn't fix this because it only accounted for the
fd_wqh lock, not the other locks nested inside it.

Link: http://lkml.kernel.org/r/20190627075004.21259-1-ebiggers@kernel.org
Fixes: bfe4037e722e ("aio: implement IOCB_CMD_POLL")
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Reported-by: syzbot+fab6de82892b6b9c6191@syzkaller.appspotmail.com
Reported-by: syzbot+53c0b767f7ca0dc0c451@syzkaller.appspotmail.com
Reported-by: syzbot+a3accb352f9c22041cfa@syzkaller.appspotmail.com
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[4.19+]
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>nfsd: Fix overflow causing non-working mounts on 1 TB machines</title>
<updated>2019-07-03T21:51:31Z</updated>
<author>
<name>Paul Menzel</name>
<email>pmenzel@molgen.mpg.de</email>
</author>
<published>2019-07-03T11:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b2d4dcf71c4a91b420f835e52ddea8192300a3b'/>
<id>urn:sha1:3b2d4dcf71c4a91b420f835e52ddea8192300a3b</id>
<content type='text'>
Since commit 10a68cdf10 (nfsd: fix performance-limiting session
calculation) (Linux 5.1-rc1 and 4.19.31), shares from NFS servers with
1 TB of memory cannot be mounted anymore. The mount just hangs on the
client.

The gist of commit 10a68cdf10 is the change below.

    -avail = clamp_t(int, avail, slotsize, avail/3);
    +avail = clamp_t(int, avail, slotsize, total_avail/3);

Here are the macros.

    #define min_t(type, x, y)       __careful_cmp((type)(x), (type)(y), &lt;)
    #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)

`total_avail` is 8,434,659,328 on the 1 TB machine. `clamp_t()` casts
the values to `int`, which for 32-bit integers can only hold values
−2,147,483,648 (−2^31) through 2,147,483,647 (2^31 − 1).

`avail` (in the function signature) is just 65536, so that no overflow
was happening. Before the commit the assignment would result in 21845,
and `num = 4`.

When using `total_avail`, it is causing the assignment to be
18446744072226137429 (printed as %lu), and `num` is then 4164608182.

My next guess is, that `nfsd_drc_mem_used` is then exceeded, and the
server thinks there is no memory available any more for this client.

Updating the arguments of `clamp_t()` and `min_t()` to `unsigned long`
fixes the issue.

Now, `avail = 65536` (before commit 10a68cdf10 `avail = 21845`), but
`num = 4` remains the same.

Fixes: c54f24e338ed (nfsd: fix performance-limiting session calculation)
Cc: stable@vger.kernel.org
Signed-off-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag '5.2-rc6-smb3-fix' of git://git.samba.org/sfrench/cifs-2.6</title>
<updated>2019-07-03T08:06:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-03T08:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6e692c3b721f30485a9124f93e27a0cb6569116c'/>
<id>urn:sha1:6e692c3b721f30485a9124f93e27a0cb6569116c</id>
<content type='text'>
Pull cifs fix from Steve French:
 "SMB3 fix (for stable as well) for crash mishandling one of the Windows
  reparse point symlink tags"

* tag '5.2-rc6-smb3-fix' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: fix crash querying symlinks stored as reparse-points
</content>
</entry>
<entry>
<title>vfs: move_mount: reject moving kernel internal mounts</title>
<updated>2019-07-01T14:46:36Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-06-29T20:27:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=570d7a98e7d6d5d8706d94ffd2d40adeaa318332'/>
<id>urn:sha1:570d7a98e7d6d5d8706d94ffd2d40adeaa318332</id>
<content type='text'>
sys_move_mount() crashes by dereferencing the pointer MNT_NS_INTERNAL,
a.k.a. ERR_PTR(-EINVAL), if the old mount is specified by fd for a
kernel object with an internal mount, such as a pipe or memfd.

Fix it by checking for this case and returning -EINVAL.

[AV: what we want is is_mounted(); use that instead of making the
condition even more convoluted]

Reproducer:

    #include &lt;unistd.h&gt;

    #define __NR_move_mount         429
    #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004

    int main()
    {
    	int fds[2];

    	pipe(fds);
        syscall(__NR_move_mount, fds[0], "", -1, "/", MOVE_MOUNT_F_EMPTY_PATH);
    }

Reported-by: syzbot+6004acbaa1893ad013f0@syzkaller.appspotmail.com
Fixes: 2db154b3ea8e ("vfs: syscall: Add move_mount(2) to move mounts around")
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
