<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v4.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-09T19:02:40Z</updated>
<entry>
<title>Merge tag 'ceph-for-4.9-rc9' of git://github.com/ceph/ceph-client</title>
<updated>2016-12-09T19:02:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-09T19:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af9468db44989f995ec98c5cc63c99b16b78ee66'/>
<id>urn:sha1:af9468db44989f995ec98c5cc63c99b16b78ee66</id>
<content type='text'>
Pull ceph fix from Ilya Dryomov:
 "A fix for an issue with -&gt;d_revalidate() in ceph, causing frequent
  kernel crashes.

  Marked for stable - it goes back to 4.6, but started popping up only
  in 4.8"

* tag 'ceph-for-4.9-rc9' of git://github.com/ceph/ceph-client:
  ceph: don't set req-&gt;r_locked_dir in ceph_d_revalidate
</content>
</entry>
<entry>
<title>ceph: don't set req-&gt;r_locked_dir in ceph_d_revalidate</title>
<updated>2016-12-08T13:32:16Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2016-11-30T20:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3f4688a08fd86f1bf8e055724c84b7a40a09733'/>
<id>urn:sha1:c3f4688a08fd86f1bf8e055724c84b7a40a09733</id>
<content type='text'>
This function sets req-&gt;r_locked_dir which is supposed to indicate to
ceph_fill_trace that the parent's i_rwsem is locked for write.
Unfortunately, there is no guarantee that the dir will be locked when
d_revalidate is called, so we really don't want ceph_fill_trace to do
any dcache manipulation from this context. Clear req-&gt;r_locked_dir since
it's clearly not safe to do that.

What we really want to know with d_revalidate is whether the dentry
still points to the same inode. ceph_fill_trace installs a pointer to
the inode in req-&gt;r_target_inode, so we can just compare that to
d_inode(dentry) to see if it's the same one after the lookup.

Also, since we aren't generally interested in the parent here, we can
switch to using a GETATTR to hint that to the MDS, which also means that
we only need to reserve one cap.

Finally, just remove the d_unhashed check. That's really outside the
purview of a filesystem's d_revalidate. If the thing became unhashed
while we're checking it, then that's up to the VFS to handle anyway.

Fixes: 200fd27c8fa2 ("ceph: use lookup request to revalidate dentry")
Link: http://tracker.ceph.com/issues/18041
Reported-by: Donatas Abraitis &lt;donatas.abraitis@gmail.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Reviewed-by: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>fuse: fix clearing suid, sgid for chown()</title>
<updated>2016-12-06T15:18:45Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2016-12-06T15:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c01638f5d919728f565bf8b5e0a6a159642df0d9'/>
<id>urn:sha1:c01638f5d919728f565bf8b5e0a6a159642df0d9</id>
<content type='text'>
Basically, the pjdfstests set the ownership of a file to 06555, and then
chowns it (as root) to a new uid/gid. Prior to commit a09f99eddef4 ("fuse:
fix killing s[ug]id in setattr"), fuse would send down a setattr with both
the uid/gid change and a new mode.  Now, it just sends down the uid/gid
change.

Technically this is NOTABUG, since POSIX doesn't _require_ that we clear
these bits for a privileged process, but Linux (wisely) has done that and I
think we don't want to change that behavior here.

This is caused by the use of should_remove_suid(), which will always return
0 when the process has CAP_FSETID.

In fact we really don't need to be calling should_remove_suid() at all,
since we've already been indicated that we should remove the suid, we just
don't want to use a (very) stale mode for that.

This patch should fix the above as well as simplify the logic.

Reported-by: Jeff Layton &lt;jlayton@redhat.com&gt; 
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: a09f99eddef4 ("fuse: fix killing s[ug]id in setattr")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs</title>
<updated>2016-12-01T18:31:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-01T18:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2caceb3294a78c389b462e7e236a4e744a53a474'/>
<id>urn:sha1:2caceb3294a78c389b462e7e236a4e744a53a474</id>
<content type='text'>
Pull overlayfs fix from Miklos Szeredi:
 "This fixes a regression introduced in 4.8"

* 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
  ovl: fix d_real() for stacked fs
</content>
</entry>
<entry>
<title>isofs: add KERN_CONT to printing of ER records</title>
<updated>2016-11-30T18:41:26Z</updated>
<author>
<name>Mike Rapoport</name>
<email>rppt@linux.vnet.ibm.com</email>
</author>
<published>2016-11-30T07:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a107bf8b3905b61bf8b5c181268bca8c05af7f69'/>
<id>urn:sha1:a107bf8b3905b61bf8b5c181268bca8c05af7f69</id>
<content type='text'>
The ER records are printed without explicit log level presuming line
continuation until "\n".  After the commit 4bcc595ccd8 (printk:
reinstate KERN_CONT for printing continuation lines), the ER records are
printed a character per line.

Adding KERN_CONT to appropriate printk statements restores the printout
behavior.

Signed-off-by: Mike Rapoport &lt;rppt@linux.vnet.ibm.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ovl: fix d_real() for stacked fs</title>
<updated>2016-11-29T09:20:24Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2016-11-29T09:20:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4fcfc1619ea43a8a89ad2f83ff23905eee088bd'/>
<id>urn:sha1:c4fcfc1619ea43a8a89ad2f83ff23905eee088bd</id>
<content type='text'>
Handling of recursion in d_real() is completely broken.  Recursion is only
done in the 'inode != NULL' case.  But when opening the file we have
'inode == NULL' hence d_real() will return an overlay dentry.  This won't
work since overlayfs doesn't define its own file operations, so all file
ops will fail.

Fix by doing the recursion first and the check against the inode second.

Bash script to reproduce the issue written by Quentin:

 - 8&lt; - - - - - 8&lt; - - - - - 8&lt; - - - - - 8&lt; - - - -
tmpdir=$(mktemp -d)
pushd ${tmpdir}

mkdir -p {upper,lower,work}
echo -n 'rocks' &gt; lower/ksplice
mount -t overlay level_zero upper -o lowerdir=lower,upperdir=upper,workdir=work
cat upper/ksplice

tmpdir2=$(mktemp -d)
pushd ${tmpdir2}

mkdir -p {upper,work}
mount -t overlay level_one upper -o lowerdir=${tmpdir}/upper,upperdir=upper,workdir=work
ls -l upper/ksplice
cat upper/ksplice
 - 8&lt; - - - - - 8&lt; - - - - - 8&lt; - - - - - 8&lt; - - - - 

Reported-by: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 2d902671ce1c ("vfs: merge .d_select_inode() into .d_real()")
Cc: &lt;stable@vger.kernel.org&gt; # v4.8+
</content>
</entry>
<entry>
<title>CIFS: iterate over posix acl xattr entry correctly in ACL_to_cifs_posix()</title>
<updated>2016-11-29T05:08:53Z</updated>
<author>
<name>Eryu Guan</name>
<email>guaneryu@gmail.com</email>
</author>
<published>2016-10-24T12:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae9ebe7c4ee0c16c3d55d1ae3096c82e0a7c136f'/>
<id>urn:sha1:ae9ebe7c4ee0c16c3d55d1ae3096c82e0a7c136f</id>
<content type='text'>
Commit 2211d5ba5c6c ("posix_acl: xattr representation cleanups")
removes the typedefs and the zero-length a_entries array in struct
posix_acl_xattr_header, and uses bare struct posix_acl_xattr_header
and struct posix_acl_xattr_entry directly.

But it failed to iterate over posix acl slots when converting posix
acls to CIFS format, which results in several test failures in
xfstests (generic/053 generic/105) when testing against a samba v1
server, starting from v4.9-rc1 kernel. e.g.

  [root@localhost xfstests]# diff -u tests/generic/105.out /root/xfstests/results//generic/105.out.bad
  --- tests/generic/105.out       2016-09-19 16:33:28.577962575 +0800
  +++ /root/xfstests/results//generic/105.out.bad 2016-10-22 15:41:15.201931110 +0800
  @@ -1,3 +1,4 @@
   QA output created by 105
   -rw-r--r-- root
  +setfacl: subdir: Invalid argument
   -rw-r--r-- root

Fix it by introducing a new "ace" var, like what
cifs_copy_posix_acl() does, and iterating posix acl xattr entries
over it in the for loop.

Signed-off-by: Eryu Guan &lt;guaneryu@gmail.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>Call echo service immediately after socket reconnect</title>
<updated>2016-11-29T05:08:52Z</updated>
<author>
<name>Sachin Prabhu</name>
<email>sprabhu@redhat.com</email>
</author>
<published>2016-10-20T23:52:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8c600120fc87d53642476f48c8055b38d6e14c7'/>
<id>urn:sha1:b8c600120fc87d53642476f48c8055b38d6e14c7</id>
<content type='text'>
Commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect
long after socket reconnect") changes the behaviour of the SMB2 echo
service and causes it to renegotiate after a socket reconnect. However
under default settings, the echo service could take up to 120 seconds to
be scheduled.

The patch forces the echo service to be called immediately resulting a
negotiate call being made immediately on reconnect.

Signed-off-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Reviewed-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>CIFS: Fix BUG() in calc_seckey()</title>
<updated>2016-11-29T05:08:52Z</updated>
<author>
<name>Sachin Prabhu</name>
<email>sprabhu@redhat.com</email>
</author>
<published>2016-10-17T20:40:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f4b55699aaff1028468e3f53853d781cdafedd6'/>
<id>urn:sha1:5f4b55699aaff1028468e3f53853d781cdafedd6</id>
<content type='text'>
Andy Lutromirski's new virtually mapped kernel stack allocations moves
kernel stacks the vmalloc area. This triggers the bug
 kernel BUG at ./include/linux/scatterlist.h:140!
at calc_seckey()-&gt;sg_init()

Signed-off-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
</entry>
<entry>
<title>fix default_file_splice_read()</title>
<updated>2016-11-27T01:05:42Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-11-27T01:05:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e54cadab447dae779f80f79c87cbeaea9594f60'/>
<id>urn:sha1:8e54cadab447dae779f80f79c87cbeaea9594f60</id>
<content type='text'>
Botched calculation of number of pages.  As the result,
we were dropping pieces when doing splice to pipe from
e.g. 9p.

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