<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v4.15</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.15</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.15'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-01-26T01:26:24Z</updated>
<entry>
<title>orangefs: fix deadlock; do not write i_size in read_iter</title>
<updated>2018-01-26T01:26:24Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-01-26T00:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6793f1c450b1533a5e9c2493490de771d38b24f9'/>
<id>urn:sha1:6793f1c450b1533a5e9c2493490de771d38b24f9</id>
<content type='text'>
After do_readv_writev, the inode cache is invalidated anyway, so i_size
will never be read.  It will be fetched from the server which will also
know about updates from other machines.

Fixes deadlock on 32-bit SMP.

See https://marc.info/?l=linux-fsdevel&amp;m=151268557427760&amp;w=2

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Mike Marshall &lt;hubcap@omnibond.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-4.15-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux</title>
<updated>2018-01-25T17:03:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-01-25T17:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=525273fb2e7c84c98e3dffc5b446141bda99ff01'/>
<id>urn:sha1:525273fb2e7c84c98e3dffc5b446141bda99ff01</id>
<content type='text'>
Pull btrfs fix from David Sterba:
 "It's been reported recently that readdir can list stale entries under
  some conditions. Fix it."

* tag 'for-4.15-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  Btrfs: fix stale entries in readdir
</content>
</entry>
<entry>
<title>Btrfs: fix stale entries in readdir</title>
<updated>2018-01-24T19:27:48Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fb.com</email>
</author>
<published>2018-01-23T20:17:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4fd493c0541d36953f7b9d3bfced67a1321792f'/>
<id>urn:sha1:e4fd493c0541d36953f7b9d3bfced67a1321792f</id>
<content type='text'>
In fixing the readdir+pagefault deadlock I accidentally introduced a
stale entry regression in readdir.  If we get close to full for the
temporary buffer, and then skip a few delayed deletions, and then try to
add another entry that won't fit, we will emit the entries we found and
retry.  Unfortunately we delete entries from our del_list as we find
them, assuming we won't need them.  However our pos will be with
whatever our last entry was, which could be before the delayed deletions
we skipped, so the next search will add the deleted entries back into
our readdir buffer.  So instead don't delete entries we find in our
del_list so we can make sure we always find our delayed deletions.  This
is a slight perf hit for readdir with lots of pending deletions, but
hopefully this isn't a common occurrence.  If it is we can revist this
and optimize it.

cc: stable@vger.kernel.org
Fixes: 23b5ec74943f ("btrfs: fix readdir deadlock with pagefault")
Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>nfsd: auth: Fix gid sorting when rootsquash enabled</title>
<updated>2018-01-23T04:13:07Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-01-22T20:11:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1995266727fa8143897e89b55f5d3c79aa828420'/>
<id>urn:sha1:1995266727fa8143897e89b55f5d3c79aa828420</id>
<content type='text'>
Commit bdcf0a423ea1 ("kernel: make groups_sort calling a responsibility
group_info allocators") appears to break nfsd rootsquash in a pretty
major way.

It adds a call to groups_sort() inside the loop that copies/squashes
gids, which means the valid gids are sorted along with the following
garbage.  The net result is that the highest numbered valid gids are
replaced with any lower-valued garbage gids, possibly including 0.

We should sort only once, after filling in all the gids.

Fixes: bdcf0a423ea1 ("kernel: make groups_sort calling a responsibility ...")
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Acked-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>orangefs: initialize op on loop restart in orangefs_devreq_read</title>
<updated>2018-01-22T21:51:14Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-01-22T20:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a0ec1ded22e6a6bc41981fae22406835b006a66e'/>
<id>urn:sha1:a0ec1ded22e6a6bc41981fae22406835b006a66e</id>
<content type='text'>
In orangefs_devreq_read, there is a loop which picks an op off the list
of pending ops.  If the loop fails to find an op, there is nothing to
read, and it returns EAGAIN.  If the op has been given up on, the loop
is restarted via a goto.  The bug is that the variable which the found
op is written to is not reinitialized, so if there are no more eligible
ops on the list, the code runs again on the already handled op.

This is triggered by interrupting a process while the op is being copied
to the client-core.  It's a fairly small window, but it's there.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>orangefs: use list_for_each_entry_safe in purge_waiting_ops</title>
<updated>2018-01-22T21:51:14Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-01-22T20:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0afc0decf247f65b7aba666a76a0a68adf4bc435'/>
<id>urn:sha1:0afc0decf247f65b7aba666a76a0a68adf4bc435</id>
<content type='text'>
set_op_state_purged can delete the op.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>proc: fix coredump vs read /proc/*/stat race</title>
<updated>2018-01-19T18:09:41Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2018-01-19T00:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8bb2ee192e482c5d500df9f2b1b26a560bd3026f'/>
<id>urn:sha1:8bb2ee192e482c5d500df9f2b1b26a560bd3026f</id>
<content type='text'>
do_task_stat() accesses IP and SP of a task without bumping reference
count of a stack (which became an entity with independent lifetime at
some point).

Steps to reproduce:

    #include &lt;stdio.h&gt;
    #include &lt;sys/types.h&gt;
    #include &lt;sys/stat.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;sys/time.h&gt;
    #include &lt;sys/resource.h&gt;
    #include &lt;unistd.h&gt;
    #include &lt;sys/wait.h&gt;

    int main(void)
    {
    	setrlimit(RLIMIT_CORE, &amp;(struct rlimit){});

    	while (1) {
    		char buf[64];
    		char buf2[4096];
    		pid_t pid;
    		int fd;

    		pid = fork();
    		if (pid == 0) {
    			*(volatile int *)0 = 0;
    		}

    		snprintf(buf, sizeof(buf), "/proc/%u/stat", pid);
    		fd = open(buf, O_RDONLY);
    		read(fd, buf2, sizeof(buf2));
    		close(fd);

    		waitpid(pid, NULL, 0);
    	}
    	return 0;
    }

    BUG: unable to handle kernel paging request at 0000000000003fd8
    IP: do_task_stat+0x8b4/0xaf0
    PGD 800000003d73e067 P4D 800000003d73e067 PUD 3d558067 PMD 0
    Oops: 0000 [#1] PREEMPT SMP PTI
    CPU: 0 PID: 1417 Comm: a.out Not tainted 4.15.0-rc8-dirty #2
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc27 04/01/2014
    RIP: 0010:do_task_stat+0x8b4/0xaf0
    Call Trace:
     proc_single_show+0x43/0x70
     seq_read+0xe6/0x3b0
     __vfs_read+0x1e/0x120
     vfs_read+0x84/0x110
     SyS_read+0x3d/0xa0
     entry_SYSCALL_64_fastpath+0x13/0x6c
    RIP: 0033:0x7f4d7928cba0
    RSP: 002b:00007ffddb245158 EFLAGS: 00000246
    Code: 03 b7 a0 01 00 00 4c 8b 4c 24 70 4c 8b 44 24 78 4c 89 74 24 18 e9 91 f9 ff ff f6 45 4d 02 0f 84 fd f7 ff ff 48 8b 45 40 48 89 ef &lt;48&gt; 8b 80 d8 3f 00 00 48 89 44 24 20 e8 9b 97 eb ff 48 89 44 24
    RIP: do_task_stat+0x8b4/0xaf0 RSP: ffffc90000607cc8
    CR2: 0000000000003fd8

John Ogness said: for my tests I added an else case to verify that the
race is hit and correctly mitigated.

Link: http://lkml.kernel.org/r/20180116175054.GA11513@avx2
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Reported-by: "Kohli, Gaurav" &lt;gkohli@codeaurora.org&gt;
Tested-by: John Ogness &lt;john.ogness@linutronix.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: &lt;stable@vger.kernel.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>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2018-01-07T01:13:21Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-01-07T01:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75d4276e83a353d5e41da676f418d4a12f6f6e6c'/>
<id>urn:sha1:75d4276e83a353d5e41da676f418d4a12f6f6e6c</id>
<content type='text'>
Pull vfs fixes from Al Viro:

 - untangle sys_close() abuses in xt_bpf

 - deal with register_shrinker() failures in sget()

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'"
  sget(): handle failures of register_shrinker()
  mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
</content>
</entry>
<entry>
<title>Merge tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux</title>
<updated>2018-01-05T21:02:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-01-05T21:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89876f275e8d562912d9c238cd888b52065cf25c'/>
<id>urn:sha1:89876f275e8d562912d9c238cd888b52065cf25c</id>
<content type='text'>
Pull btrfs fixes from David Sterba:
 "We have two more fixes for 4.15, both aimed for stable.

  The leak fix is obvious, the second patch fixes a bug revealed by the
  refcount API, when it behaves differently than previous atomic_t and
  reports refs going from 0 to 1 in one case"

* tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: fix refcount_t usage when deleting btrfs_delayed_nodes
  btrfs: Fix flush bio leak
</content>
</entry>
<entry>
<title>Merge tag 'xfs-4.15-fixes-10' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux</title>
<updated>2018-01-05T20:59:32Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-01-05T20:59:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12e971b652e3166c3039e09ad2cb5568fc7f040a'/>
<id>urn:sha1:12e971b652e3166c3039e09ad2cb5568fc7f040a</id>
<content type='text'>
Pull XFS fixes from Darrick Wong:
 "I have just a few fixes for bugs and resource cleanup problems this
  week:

   - Fix resource cleanup of failed quota initialization

   - Fix integer overflow problems wrt s_maxbytes"

* tag 'xfs-4.15-fixes-10' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix s_maxbytes overflow problems
  xfs: quota: check result of register_shrinker()
  xfs: quota: fix missed destroy of qi_tree_lock
</content>
</entry>
</feed>
