<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v3.8.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v3.8.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v3.8.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-14T18:26:36Z</updated>
<entry>
<title>vfs: fix pipe counter breakage</title>
<updated>2013-03-14T18:26:36Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2013-03-12T02:59:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1d37307ac159185e3bfdd4189a3ac8643ce7cc0e'/>
<id>urn:sha1:1d37307ac159185e3bfdd4189a3ac8643ce7cc0e</id>
<content type='text'>
commit a930d8790552658140d7d0d2e316af4f0d76a512 upstream.

If you open a pipe for neither read nor write, the pipe code will not
add any usage counters to the pipe, causing the 'struct pipe_inode_info"
to be potentially released early.

That doesn't normally matter, since you cannot actually use the pipe,
but the pipe release code - particularly fasync handling - still expects
the actual pipe infrastructure to all be there.  And rather than adding
NULL pointer checks, let's just disallow this case, the same way we
already do for the named pipe ("fifo") case.

This is ancient going back to pre-2.4 days, and until trinity, nobody
naver noticed.

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys</title>
<updated>2013-03-14T18:26:36Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2013-02-25T15:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f4027c67cc437eb44721435bb9916995bb1de6d'/>
<id>urn:sha1:5f4027c67cc437eb44721435bb9916995bb1de6d</id>
<content type='text'>
commit 8aec0f5d4137532de14e6554fd5dd201ff3a3c49 upstream.

Looking at mm/process_vm_access.c:process_vm_rw() and comparing it to
compat_process_vm_rw() shows that the compatibility code requires an
explicit "access_ok()" check before calling
compat_rw_copy_check_uvector(). The same difference seems to appear when
we compare fs/read_write.c:do_readv_writev() to
fs/compat.c:compat_do_readv_writev().

This subtle difference between the compat and non-compat requirements
should probably be debated, as it seems to be error-prone. In fact,
there are two others sites that use this function in the Linux kernel,
and they both seem to get it wrong:

Now shifting our attention to fs/aio.c, we see that aio_setup_iocb()
also ends up calling compat_rw_copy_check_uvector() through
aio_setup_vectored_rw(). Unfortunately, the access_ok() check appears to
be missing. Same situation for
security/keys/compat.c:compat_keyctl_instantiate_key_iov().

I propose that we add the access_ok() check directly into
compat_rw_copy_check_uvector(), so callers don't have to worry about it,
and it therefore makes the compat call code similar to its non-compat
counterpart. Place the access_ok() check in the same location where
copy_from_user() can trigger a -EFAULT error in the non-compat code, so
the ABI behaviors are alike on both compat and non-compat.

While we are here, fix compat_do_readv_writev() so it checks for
compat_rw_copy_check_uvector() negative return values.

And also, fix a memory leak in compat_keyctl_instantiate_key_iov() error
handling.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Btrfs: cleanup orphan reservation if truncate fails</title>
<updated>2013-03-14T18:26:35Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-02-07T21:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5cb065d3405ac7549caedccd92e7e51adce916bd'/>
<id>urn:sha1:5cb065d3405ac7549caedccd92e7e51adce916bd</id>
<content type='text'>
commit 4a7d0f6854c4a4ad1dba00a3b128a32d39b9a742 upstream.

I noticed we were getting lots of warnings with xfstest 83 because we have
reservations outstanding.  This is because we moved the orphan add outside
of the truncate, but we don't actually cleanup our reservation if something
fails.  This fixes the problem and I no longer see warnings.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Btrfs: account for orphan inodes properly during cleanup</title>
<updated>2013-03-14T18:26:35Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-02-01T20:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f62c696e2fed435824de55e6ceba73abe2304bf'/>
<id>urn:sha1:5f62c696e2fed435824de55e6ceba73abe2304bf</id>
<content type='text'>
commit 925396ecf251432d6d0f703a6cfd0cb9e651d936 upstream.

Dave sent me a panic where we were doing the orphan cleanup and panic'ed
trying to release our reservation from the orphan block rsv.  The reason for
this is because our orphan block rsv had been free'd out from underneath us
because the transaction commit found that there were no orphan inodes
according to its count and decided to free it.  This is incorrect so make
sure we inc the orphan inodes count so the accounting is all done properly.
This would also cause the warning in the orphan commit code normally if you
had any orphans to cleanup as they would only decrement the orphan count so
you'd get a negative orphan count which could cause problems during runtime.
Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: Fix missing of oplock_read value in smb30_values structure</title>
<updated>2013-03-14T18:26:25Z</updated>
<author>
<name>Pavel Shilovsky</name>
<email>piastry@etersoft.ru</email>
</author>
<published>2013-03-06T15:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a1710dc673b7c94f31f487b9a735c0305061f82'/>
<id>urn:sha1:0a1710dc673b7c94f31f487b9a735c0305061f82</id>
<content type='text'>
commit 067785c40e52089993757afa28988c05f3cb2694 upstream.

Signed-off-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>proc: Use nd_jump_link in proc_ns_follow_link</title>
<updated>2013-03-14T18:26:25Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2013-03-09T08:14:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6474cd4cf32ac9edf960903db0f7b9955618ae4a'/>
<id>urn:sha1:6474cd4cf32ac9edf960903db0f7b9955618ae4a</id>
<content type='text'>
commit db04dc679bcc780ad6907943afe24a30de974a1b upstream.

Update proc_ns_follow_link to use nd_jump_link instead of just
manually updating nd.path.dentry.

This fixes the BUG_ON(nd-&gt;inode != parent-&gt;d_inode) reported by Dave
Jones and reproduced trivially with mkdir /proc/self/ns/uts/a.

Sigh it looks like the VFS change to require use of nd_jump_link
happend while proc_ns_follow_link was baking and since the common case
of proc_ns_follow_link continued to work without problems the need for
making this change was overlooked.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>vfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink</title>
<updated>2013-03-14T18:26:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-03-08T17:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e424eb1c5e3650a486f0c9997d12081b999d1b4'/>
<id>urn:sha1:9e424eb1c5e3650a486f0c9997d12081b999d1b4</id>
<content type='text'>
commit 7b54c165a0c012edbaeaa73c5c87cb73721eb580 upstream.

It's "normal" - it can happen if the file descriptor you followed was
opened with O_NOFOLLOW.

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFSv4.1: Hold reference to layout hdr in layoutget</title>
<updated>2013-03-14T18:26:12Z</updated>
<author>
<name>Weston Andros Adamson</name>
<email>dros@netapp.com</email>
</author>
<published>2013-02-26T02:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=216e418695182cfbcceab88dd129eaef1d23127c'/>
<id>urn:sha1:216e418695182cfbcceab88dd129eaef1d23127c</id>
<content type='text'>
commit a47970ff7814718fec31b7d966747c6aa1a3545f upstream.

This fixes an oops where a LAYOUTGET is in still in the rpciod queue,
but the requesting processes has been killed.  Without this, killing
the process does the final pnfs_put_layout_hdr() and sets NFS_I(inode)-&gt;layout
to NULL while the LAYOUTGET rpc task still references it.

Example oops:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
IP: [&lt;ffffffffa01bd586&gt;] pnfs_choose_layoutget_stateid+0x37/0xef [nfsv4]
PGD 7365b067 PUD 7365d067 PMD 0
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
Modules linked in: nfs_layout_nfsv41_files nfsv4 auth_rpcgss nfs lockd sunrpc ipt_MASQUERADE ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat_ipv4 nf_nat iptable_mangle ip6table_filter ip6_tables ppdev e1000 i2c_piix4 i2c_core shpchp parport_pc parport crc32c_intel aesni_intel xts aes_x86_64 lrw gf128mul ablk_helper cryptd mptspi scsi_transport_spi mptscsih mptbase floppy autofs4
CPU 0
Pid: 27, comm: kworker/0:1 Not tainted 3.8.0-dros_cthon2013+ #4 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
RIP: 0010:[&lt;ffffffffa01bd586&gt;]  [&lt;ffffffffa01bd586&gt;] pnfs_choose_layoutget_stateid+0x37/0xef [nfsv4]
RSP: 0018:ffff88007b0c1c88  EFLAGS: 00010246
RAX: ffff88006ed36678 RBX: 0000000000000000 RCX: 0000000ea877e3bc
RDX: ffff88007a729da8 RSI: 0000000000000000 RDI: ffff88007a72b958
RBP: ffff88007b0c1ca8 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88007a72b958
R13: ffff88007a729da8 R14: 0000000000000000 R15: ffffffffa011077e
FS:  0000000000000000(0000) GS:ffff88007f600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000080 CR3: 00000000735f8000 CR4: 00000000001407f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kworker/0:1 (pid: 27, threadinfo ffff88007b0c0000, task ffff88007c2fa0c0)
Stack:
 ffff88006fc05388 ffff88007a72b908 ffff88007b240900 ffff88006fc05388
 ffff88007b0c1cd8 ffffffffa01a2170 ffff88007b240900 ffff88007b240900
 ffff88007b240970 ffffffffa011077e ffff88007b0c1ce8 ffffffffa0110791
Call Trace:
 [&lt;ffffffffa01a2170&gt;] nfs4_layoutget_prepare+0x7b/0x92 [nfsv4]
 [&lt;ffffffffa011077e&gt;] ? __rpc_atrun+0x15/0x15 [sunrpc]
 [&lt;ffffffffa0110791&gt;] rpc_prepare_task+0x13/0x15 [sunrpc]

Reported-by: Tigran Mkrtchyan &lt;tigran.mkrtchyan@desy.de&gt;
Signed-off-by: Weston Andros Adamson &lt;dros@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pnfs: fix resend_to_mds for directio</title>
<updated>2013-03-14T18:26:12Z</updated>
<author>
<name>Benny Halevy</name>
<email>bhalevy@tonian.com</email>
</author>
<published>2013-02-24T14:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a6b9a1d3a8763502150bebc0158ffd586f898643'/>
<id>urn:sha1:a6b9a1d3a8763502150bebc0158ffd586f898643</id>
<content type='text'>
commit 78f33277f96430ea001c39e952f6b8200b2ab850 upstream.

Pass the directio request on pageio_init to clean up the API.

Percolate pg_dreq from original nfs_pageio_descriptor to the
pnfs_{read,write}_done_resend_to_mds and use it on respective
call to nfs_pageio_init_{read,write} on the newly created
nfs_pageio_descriptor.

Reproduced by command:
 mount -o vers=4.1 server:/ /mnt
 dd bs=128k count=8 if=/dev/zero of=/mnt/dd.out oflag=direct

BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
IP: [&lt;ffffffffa021a3a8&gt;] atomic_inc+0x4/0x9 [nfs]
PGD 34786067 PUD 34794067 PMD 0
Oops: 0002 [#1] SMP
Modules linked in: nfs_layout_nfsv41_files nfsv4 nfs nfsd lockd nfs_acl auth_rpcgss exportfs sunrpc btrfs zlib_deflate libcrc32c ipv6 autofs4
CPU 1
Pid: 259, comm: kworker/1:2 Not tainted 3.8.0-rc6 #2 Bochs Bochs
RIP: 0010:[&lt;ffffffffa021a3a8&gt;]  [&lt;ffffffffa021a3a8&gt;] atomic_inc+0x4/0x9 [nfs]
RSP: 0018:ffff880038f8fa68  EFLAGS: 00010206
RAX: ffffffffa021a6a9 RBX: ffff880038f8fb48 RCX: 00000000000a0000
RDX: ffffffffa021e616 RSI: ffff8800385e9a40 RDI: 0000000000000028
RBP: ffff880038f8fa68 R08: ffffffff81ad6720 R09: ffff8800385e9510
R10: ffffffffa0228450 R11: ffff880038e87418 R12: ffff8800385e9a40
R13: ffff8800385e9a70 R14: ffff880038f8fb38 R15: ffffffffa0148878
FS:  0000000000000000(0000) GS:ffff88003e400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000028 CR3: 0000000034789000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kworker/1:2 (pid: 259, threadinfo ffff880038f8e000, task ffff880038302480)
Stack:
 ffff880038f8fa78 ffffffffa021a6bf ffff880038f8fa88 ffffffffa021bb82
 ffff880038f8fae8 ffffffffa021f454 ffff880038f8fae8 ffffffff8109689d
 ffff880038f8fab8 ffffffff00000006 0000000000000000 ffff880038f8fb48
Call Trace:
 [&lt;ffffffffa021a6bf&gt;] nfs_direct_pgio_init+0x16/0x18 [nfs]
 [&lt;ffffffffa021bb82&gt;] nfs_pgheader_init+0x6a/0x6c [nfs]
 [&lt;ffffffffa021f454&gt;] nfs_generic_pg_writepages+0x51/0xf8 [nfs]
 [&lt;ffffffff8109689d&gt;] ? mark_held_locks+0x71/0x99
 [&lt;ffffffffa0148878&gt;] ? rpc_release_resources_task+0x37/0x37 [sunrpc]
 [&lt;ffffffffa021bc25&gt;] nfs_pageio_doio+0x1a/0x43 [nfs]
 [&lt;ffffffffa021be7c&gt;] nfs_pageio_complete+0x16/0x2c [nfs]
 [&lt;ffffffffa02608be&gt;] pnfs_write_done_resend_to_mds+0x95/0xc5 [nfsv4]
 [&lt;ffffffffa0148878&gt;] ? rpc_release_resources_task+0x37/0x37 [sunrpc]
 [&lt;ffffffffa028e27f&gt;] filelayout_reset_write+0x8c/0x99 [nfs_layout_nfsv41_files]
 [&lt;ffffffffa028e5f9&gt;] filelayout_write_done_cb+0x4d/0xc1 [nfs_layout_nfsv41_files]
 [&lt;ffffffffa024587a&gt;] nfs4_write_done+0x36/0x49 [nfsv4]
 [&lt;ffffffffa021f996&gt;] nfs_writeback_done+0x53/0x1cc [nfs]
 [&lt;ffffffffa021fb1d&gt;] nfs_writeback_done_common+0xe/0x10 [nfs]
 [&lt;ffffffffa028e03d&gt;] filelayout_write_call_done+0x28/0x2a [nfs_layout_nfsv41_files]
 [&lt;ffffffffa01488a1&gt;] rpc_exit_task+0x29/0x87 [sunrpc]
 [&lt;ffffffffa014a0c9&gt;] __rpc_execute+0x11d/0x3cc [sunrpc]
 [&lt;ffffffff810969dc&gt;] ? trace_hardirqs_on_caller+0x117/0x173
 [&lt;ffffffffa014a39f&gt;] rpc_async_schedule+0x27/0x32 [sunrpc]
 [&lt;ffffffffa014a378&gt;] ? __rpc_execute+0x3cc/0x3cc [sunrpc]
 [&lt;ffffffff8105f8c1&gt;] process_one_work+0x226/0x422
 [&lt;ffffffff8105f7f4&gt;] ? process_one_work+0x159/0x422
 [&lt;ffffffff81094757&gt;] ? lock_acquired+0x210/0x249
 [&lt;ffffffffa014a378&gt;] ? __rpc_execute+0x3cc/0x3cc [sunrpc]
 [&lt;ffffffff810600d8&gt;] worker_thread+0x126/0x1c4
 [&lt;ffffffff8105ffb2&gt;] ? manage_workers+0x240/0x240
 [&lt;ffffffff81064ef8&gt;] kthread+0xb1/0xb9
 [&lt;ffffffff81064e47&gt;] ? __kthread_parkme+0x65/0x65
 [&lt;ffffffff815206ec&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff81064e47&gt;] ? __kthread_parkme+0x65/0x65
Code: 00 83 38 02 74 12 48 81 4b 50 00 00 01 00 c7 83 60 07 00 00 01 00 00 00 48 89 df e8 55 fe ff ff 5b 41 5c 5d c3 66 90 55 48 89 e5 &lt;f0&gt; ff 07 5d c3 55 48 89 e5 f0 ff 0f 0f 94 c0 84 c0 0f 95 c0 0f
RIP  [&lt;ffffffffa021a3a8&gt;] atomic_inc+0x4/0x9 [nfs]
 RSP &lt;ffff880038f8fa68&gt;
CR2: 0000000000000028

Signed-off-by: Benny Halevy &lt;bhalevy@tonian.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFS: Don't allow NFS silly-renamed files to be deleted, no signal</title>
<updated>2013-03-14T18:26:12Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-02-22T17:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a14f843b1a8bc230023762c18cd9af1225cf47f'/>
<id>urn:sha1:8a14f843b1a8bc230023762c18cd9af1225cf47f</id>
<content type='text'>
commit 5a7a613a47a715711b3f2d3322a0eac21d459166 upstream.

Commit 73ca100 broke the code that prevents the client from deleting
a silly renamed dentry.  This affected "delete on last close"
semantics as after that commit, nothing prevented removal of
silly-renamed files.  As a result, a process holding a file open
could easily get an ESTALE on the file in a directory where some
other process issued 'rm -rf some_dir_containing_the_file' twice.
Before the commit, any attempt at unlinking silly renamed files would
fail inside may_delete() with -EBUSY because of the
DCACHE_NFSFS_RENAMED flag.  The following testcase demonstrates
the problem:
  tail -f /nfsmnt/dir/file &amp;
  rm -rf /nfsmnt/dir
  rm -rf /nfsmnt/dir
  # second removal does not fail, 'tail' process receives ESTALE

The problem with the above commit is that it unhashes the old and
new dentries from the lookup path, even in the normal case when
a signal is not encountered and it would have been safe to call
d_move.  Unfortunately the old dentry has the special
DCACHE_NFSFS_RENAMED flag set on it.  Unhashing has the
side-effect that future lookups call d_alloc(), allocating a new
dentry without the special flag for any silly-renamed files.  As a
result, subsequent calls to unlink silly renamed files do not fail
but allow the removal to go through.  This will result in ESTALE
errors for any other process doing operations on the file.

To fix this, go back to using d_move on success.
For the signal case, it's unclear what we may safely do beyond d_drop.

Reported-by: Dave Wysochanski &lt;dwysocha@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Acked-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
