<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/nfs, branch linux-4.5.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>nfs: avoid race that crashes nfs_init_commit</title>
<updated>2016-06-08T01:18:53+00:00</updated>
<author>
<name>Weston Andros Adamson</name>
<email>dros@monkey.org</email>
</author>
<published>2016-05-25T14:07:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3ae21caffa7a5bf482382fdcd05477084e62a7c6'/>
<id>3ae21caffa7a5bf482382fdcd05477084e62a7c6</id>
<content type='text'>
commit ade8febde0271513360bac44883dbebad44276c3 upstream.

Since the patch "NFS: Allow multiple commit requests in flight per file"
we can run multiple simultaneous commits on the same inode.  This
introduced a race over collecting pages to commit that made it possible
to call nfs_init_commit() with an empty list - which causes crashes like
the one below.

The fix is to catch this race and avoid calling nfs_init_commit and
initiate_commit when there is no work to do.

Here is the crash:

[600522.076832] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
[600522.078475] IP: [&lt;ffffffffa0479e72&gt;] nfs_init_commit+0x22/0x130 [nfs]
[600522.078745] PGD 4272b1067 PUD 4272cb067 PMD 0
[600522.078972] Oops: 0000 [#1] SMP
[600522.079204] Modules linked in: nfsv3 nfs_layout_flexfiles rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache dcdbas ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vmw_vsock_vmci_transport vsock bonding ipmi_devintf ipmi_msghandler coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ppdev vmw_balloon parport_pc parport acpi_cpufreq vmw_vmci i2c_piix4 shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel serio_raw vmxnet3
[600522.081380]  vmw_pvscsi ata_generic pata_acpi
[600522.081809] CPU: 3 PID: 15667 Comm: /usr/bin/python Not tainted 4.1.9-100.pd.88.el7.x86_64 #1
[600522.082281] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2014
[600522.082814] task: ffff8800bbbfa780 ti: ffff88042ae84000 task.ti: ffff88042ae84000
[600522.083378] RIP: 0010:[&lt;ffffffffa0479e72&gt;]  [&lt;ffffffffa0479e72&gt;] nfs_init_commit+0x22/0x130 [nfs]
[600522.083973] RSP: 0018:ffff88042ae87438  EFLAGS: 00010246
[600522.084571] RAX: 0000000000000000 RBX: ffff880003485e40 RCX: ffff88042ae87588
[600522.085188] RDX: 0000000000000000 RSI: ffff88042ae874b0 RDI: ffff880003485e40
[600522.085756] RBP: ffff88042ae87448 R08: ffff880003486010 R09: ffff88042ae874b0
[600522.086332] R10: 0000000000000000 R11: 0000000000000005 R12: ffff88042ae872d0
[600522.086905] R13: ffff88042ae874b0 R14: ffff880003485e40 R15: ffff88042704c840
[600522.087484] FS:  00007f4728ff2740(0000) GS:ffff88043fd80000(0000) knlGS:0000000000000000
[600522.088070] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[600522.088663] CR2: 0000000000000040 CR3: 000000042b6aa000 CR4: 00000000001406e0
[600522.089327] Stack:
[600522.089926]  0000000000000001 ffff88042ae87588 ffff88042ae874f8 ffffffffa04f09fa
[600522.090549]  0000000000017840 0000000000017840 ffff88042ae87588 ffff8803258d9930
[600522.091169]  ffff88042ae87578 ffffffffa0563d80 0000000000000000 ffff88042704c840
[600522.091789] Call Trace:
[600522.092420]  [&lt;ffffffffa04f09fa&gt;] pnfs_generic_commit_pagelist+0x1da/0x320 [nfsv4]
[600522.093052]  [&lt;ffffffffa0563d80&gt;] ? ff_layout_commit_prepare_v3+0x30/0x30 [nfs_layout_flexfiles]
[600522.093696]  [&lt;ffffffffa0562645&gt;] ff_layout_commit_pagelist+0x15/0x20 [nfs_layout_flexfiles]
[600522.094359]  [&lt;ffffffffa047bc78&gt;] nfs_generic_commit_list+0xe8/0x120 [nfs]
[600522.095032]  [&lt;ffffffffa047bd6a&gt;] nfs_commit_inode+0xba/0x110 [nfs]
[600522.095719]  [&lt;ffffffffa046ac54&gt;] nfs_release_page+0x44/0xd0 [nfs]
[600522.096410]  [&lt;ffffffff811a8122&gt;] try_to_release_page+0x32/0x50
[600522.097109]  [&lt;ffffffff811bd4f1&gt;] shrink_page_list+0x961/0xb30
[600522.097812]  [&lt;ffffffff811bdced&gt;] shrink_inactive_list+0x1cd/0x550
[600522.098530]  [&lt;ffffffff811bea65&gt;] shrink_lruvec+0x635/0x840
[600522.099250]  [&lt;ffffffff811bed60&gt;] shrink_zone+0xf0/0x2f0
[600522.099974]  [&lt;ffffffff811bf312&gt;] do_try_to_free_pages+0x192/0x470
[600522.100709]  [&lt;ffffffff811bf6ca&gt;] try_to_free_pages+0xda/0x170
[600522.101464]  [&lt;ffffffff811b2198&gt;] __alloc_pages_nodemask+0x588/0x970
[600522.102235]  [&lt;ffffffff811fbbd5&gt;] alloc_pages_vma+0xb5/0x230
[600522.103000]  [&lt;ffffffff813a1589&gt;] ? cpumask_any_but+0x39/0x50
[600522.103774]  [&lt;ffffffff811d6115&gt;] wp_page_copy.isra.55+0x95/0x490
[600522.104558]  [&lt;ffffffff810e3438&gt;] ? __wake_up+0x48/0x60
[600522.105357]  [&lt;ffffffff811d7d3b&gt;] do_wp_page+0xab/0x4f0
[600522.106137]  [&lt;ffffffff810a1bbb&gt;] ? release_task+0x36b/0x470
[600522.106902]  [&lt;ffffffff8126dbd7&gt;] ? eventfd_ctx_read+0x67/0x1c0
[600522.107659]  [&lt;ffffffff811da2a8&gt;] handle_mm_fault+0xc78/0x1900
[600522.108431]  [&lt;ffffffff81067ef1&gt;] __do_page_fault+0x181/0x420
[600522.109173]  [&lt;ffffffff811446a6&gt;] ? __audit_syscall_exit+0x1e6/0x280
[600522.109893]  [&lt;ffffffff810681c0&gt;] do_page_fault+0x30/0x80
[600522.110594]  [&lt;ffffffff81024f36&gt;] ? syscall_trace_leave+0xc6/0x120
[600522.111288]  [&lt;ffffffff81790a58&gt;] page_fault+0x28/0x30
[600522.111947] Code: 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 4c 8d 87 d0 01 00 00 48 89 e5 53 48 89 fb 48 83 ec 08 4c 8b 0e 49 8b 41 18 4c 39 ce &lt;48&gt; 8b 40 40 4c 8b 50 30 74 24 48 8b 87 d0 01 00 00 48 8b 7e 08
[600522.113343] RIP  [&lt;ffffffffa0479e72&gt;] nfs_init_commit+0x22/0x130 [nfs]
[600522.114003]  RSP &lt;ffff88042ae87438&gt;
[600522.114636] CR2: 0000000000000040

Fixes: af7cf057 (NFS: Allow multiple commit requests in flight per file)
Signed-off-by: Weston Andros Adamson &lt;dros@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ade8febde0271513360bac44883dbebad44276c3 upstream.

Since the patch "NFS: Allow multiple commit requests in flight per file"
we can run multiple simultaneous commits on the same inode.  This
introduced a race over collecting pages to commit that made it possible
to call nfs_init_commit() with an empty list - which causes crashes like
the one below.

The fix is to catch this race and avoid calling nfs_init_commit and
initiate_commit when there is no work to do.

Here is the crash:

[600522.076832] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
[600522.078475] IP: [&lt;ffffffffa0479e72&gt;] nfs_init_commit+0x22/0x130 [nfs]
[600522.078745] PGD 4272b1067 PUD 4272cb067 PMD 0
[600522.078972] Oops: 0000 [#1] SMP
[600522.079204] Modules linked in: nfsv3 nfs_layout_flexfiles rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache dcdbas ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vmw_vsock_vmci_transport vsock bonding ipmi_devintf ipmi_msghandler coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ppdev vmw_balloon parport_pc parport acpi_cpufreq vmw_vmci i2c_piix4 shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel serio_raw vmxnet3
[600522.081380]  vmw_pvscsi ata_generic pata_acpi
[600522.081809] CPU: 3 PID: 15667 Comm: /usr/bin/python Not tainted 4.1.9-100.pd.88.el7.x86_64 #1
[600522.082281] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2014
[600522.082814] task: ffff8800bbbfa780 ti: ffff88042ae84000 task.ti: ffff88042ae84000
[600522.083378] RIP: 0010:[&lt;ffffffffa0479e72&gt;]  [&lt;ffffffffa0479e72&gt;] nfs_init_commit+0x22/0x130 [nfs]
[600522.083973] RSP: 0018:ffff88042ae87438  EFLAGS: 00010246
[600522.084571] RAX: 0000000000000000 RBX: ffff880003485e40 RCX: ffff88042ae87588
[600522.085188] RDX: 0000000000000000 RSI: ffff88042ae874b0 RDI: ffff880003485e40
[600522.085756] RBP: ffff88042ae87448 R08: ffff880003486010 R09: ffff88042ae874b0
[600522.086332] R10: 0000000000000000 R11: 0000000000000005 R12: ffff88042ae872d0
[600522.086905] R13: ffff88042ae874b0 R14: ffff880003485e40 R15: ffff88042704c840
[600522.087484] FS:  00007f4728ff2740(0000) GS:ffff88043fd80000(0000) knlGS:0000000000000000
[600522.088070] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[600522.088663] CR2: 0000000000000040 CR3: 000000042b6aa000 CR4: 00000000001406e0
[600522.089327] Stack:
[600522.089926]  0000000000000001 ffff88042ae87588 ffff88042ae874f8 ffffffffa04f09fa
[600522.090549]  0000000000017840 0000000000017840 ffff88042ae87588 ffff8803258d9930
[600522.091169]  ffff88042ae87578 ffffffffa0563d80 0000000000000000 ffff88042704c840
[600522.091789] Call Trace:
[600522.092420]  [&lt;ffffffffa04f09fa&gt;] pnfs_generic_commit_pagelist+0x1da/0x320 [nfsv4]
[600522.093052]  [&lt;ffffffffa0563d80&gt;] ? ff_layout_commit_prepare_v3+0x30/0x30 [nfs_layout_flexfiles]
[600522.093696]  [&lt;ffffffffa0562645&gt;] ff_layout_commit_pagelist+0x15/0x20 [nfs_layout_flexfiles]
[600522.094359]  [&lt;ffffffffa047bc78&gt;] nfs_generic_commit_list+0xe8/0x120 [nfs]
[600522.095032]  [&lt;ffffffffa047bd6a&gt;] nfs_commit_inode+0xba/0x110 [nfs]
[600522.095719]  [&lt;ffffffffa046ac54&gt;] nfs_release_page+0x44/0xd0 [nfs]
[600522.096410]  [&lt;ffffffff811a8122&gt;] try_to_release_page+0x32/0x50
[600522.097109]  [&lt;ffffffff811bd4f1&gt;] shrink_page_list+0x961/0xb30
[600522.097812]  [&lt;ffffffff811bdced&gt;] shrink_inactive_list+0x1cd/0x550
[600522.098530]  [&lt;ffffffff811bea65&gt;] shrink_lruvec+0x635/0x840
[600522.099250]  [&lt;ffffffff811bed60&gt;] shrink_zone+0xf0/0x2f0
[600522.099974]  [&lt;ffffffff811bf312&gt;] do_try_to_free_pages+0x192/0x470
[600522.100709]  [&lt;ffffffff811bf6ca&gt;] try_to_free_pages+0xda/0x170
[600522.101464]  [&lt;ffffffff811b2198&gt;] __alloc_pages_nodemask+0x588/0x970
[600522.102235]  [&lt;ffffffff811fbbd5&gt;] alloc_pages_vma+0xb5/0x230
[600522.103000]  [&lt;ffffffff813a1589&gt;] ? cpumask_any_but+0x39/0x50
[600522.103774]  [&lt;ffffffff811d6115&gt;] wp_page_copy.isra.55+0x95/0x490
[600522.104558]  [&lt;ffffffff810e3438&gt;] ? __wake_up+0x48/0x60
[600522.105357]  [&lt;ffffffff811d7d3b&gt;] do_wp_page+0xab/0x4f0
[600522.106137]  [&lt;ffffffff810a1bbb&gt;] ? release_task+0x36b/0x470
[600522.106902]  [&lt;ffffffff8126dbd7&gt;] ? eventfd_ctx_read+0x67/0x1c0
[600522.107659]  [&lt;ffffffff811da2a8&gt;] handle_mm_fault+0xc78/0x1900
[600522.108431]  [&lt;ffffffff81067ef1&gt;] __do_page_fault+0x181/0x420
[600522.109173]  [&lt;ffffffff811446a6&gt;] ? __audit_syscall_exit+0x1e6/0x280
[600522.109893]  [&lt;ffffffff810681c0&gt;] do_page_fault+0x30/0x80
[600522.110594]  [&lt;ffffffff81024f36&gt;] ? syscall_trace_leave+0xc6/0x120
[600522.111288]  [&lt;ffffffff81790a58&gt;] page_fault+0x28/0x30
[600522.111947] Code: 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 4c 8d 87 d0 01 00 00 48 89 e5 53 48 89 fb 48 83 ec 08 4c 8b 0e 49 8b 41 18 4c 39 ce &lt;48&gt; 8b 40 40 4c 8b 50 30 74 24 48 8b 87 d0 01 00 00 48 8b 7e 08
[600522.113343] RIP  [&lt;ffffffffa0479e72&gt;] nfs_init_commit+0x22/0x130 [nfs]
[600522.114003]  RSP &lt;ffff88042ae87438&gt;
[600522.114636] CR2: 0000000000000040

Fixes: af7cf057 (NFS: Allow multiple commit requests in flight per file)
Signed-off-by: Weston Andros Adamson &lt;dros@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: use file_dentry()</title>
<updated>2016-04-20T06:45:24+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2016-03-26T20:14:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=385e5edc295f7feeef00c64f2f5c14b3530940ef'/>
<id>385e5edc295f7feeef00c64f2f5c14b3530940ef</id>
<content type='text'>
commit be62a1a8fd116f5cd9e53726601f970e16e17558 upstream.

NFS may be used as lower layer of overlayfs and accessing f_path.dentry can
lead to a crash.

Fix by replacing direct access of file-&gt;f_path.dentry with the
file_dentry() accessor, which will always return a native object.

Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Tested-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit be62a1a8fd116f5cd9e53726601f970e16e17558 upstream.

NFS may be used as lower layer of overlayfs and accessing f_path.dentry can
lead to a crash.

Fix by replacing direct access of file-&gt;f_path.dentry with the
file_dentry() accessor, which will always return a native object.

Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Tested-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4.x/pnfs: Fix a race between layoutget and bulk recalls</title>
<updated>2016-02-22T22:46:34+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-22T22:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9fd4b9fc7695a4da1363a0b439853f88fb6a034f'/>
<id>9fd4b9fc7695a4da1363a0b439853f88fb6a034f</id>
<content type='text'>
Replace another case where the layout 'plh_block_lgets' can trigger
infinite loops in send_layoutget().

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace another case where the layout 'plh_block_lgets' can trigger
infinite loops in send_layoutget().

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4.x/pnfs: Fix a race between layoutget and pnfs_destroy_layout</title>
<updated>2016-02-22T22:34:59+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-22T22:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2454dfea0aef8a883d4302c38124edb373d47a25'/>
<id>2454dfea0aef8a883d4302c38124edb373d47a25</id>
<content type='text'>
If the server reboots while there is a layoutget outstanding, then
the call to pnfs_choose_layoutget_stateid() will fail with an EAGAIN
error, which causes an infinite loop in send_layoutget(). The reason
why we never break out of the loop is that the layout 'plh_block_lgets'
field is never cleared.

Fix is to replace plh_block_lgets with NFS_LAYOUT_INVALID_STID, which
can be reset after a new layoutget.

Fixes: ab7d763e477c5 ("pNFS: Ensure nfs4_layoutget_prepare returns...")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the server reboots while there is a layoutget outstanding, then
the call to pnfs_choose_layoutget_stateid() will fail with an EAGAIN
error, which causes an infinite loop in send_layoutget(). The reason
why we never break out of the loop is that the layout 'plh_block_lgets'
field is never cleared.

Fix is to replace plh_block_lgets with NFS_LAYOUT_INVALID_STID, which
can be reset after a new layoutget.

Fixes: ab7d763e477c5 ("pNFS: Ensure nfs4_layoutget_prepare returns...")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs/blocklayout: fix a memeory leak when using,vmalloc_to_page</title>
<updated>2016-02-17T16:44:45+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2016-02-01T01:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c89757061a4e4017a21ef632dc100449a7bab7dd'/>
<id>c89757061a4e4017a21ef632dc100449a7bab7dd</id>
<content type='text'>
unreferenced object 0xffffc90000abf000 (size 16900):
  comm "fsync02", pid 15765, jiffies 4297431627 (age 423.772s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 a0 c2 19 00 88 ff ff  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff8174d54e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811b9b91&gt;] __vmalloc_node_range+0x231/0x280
    [&lt;ffffffff811b9c2a&gt;] __vmalloc+0x4a/0x50
    [&lt;ffffffffa02c9ec1&gt;] ext_tree_prepare_commit+0x231/0x2e0 [blocklayoutdriver]
    [&lt;ffffffffa02c700e&gt;] bl_prepare_layoutcommit+0xe/0x10 [blocklayoutdriver]
    [&lt;ffffffffa0596a6c&gt;] pnfs_layoutcommit_inode+0x29c/0x330 [nfsv4]
    [&lt;ffffffffa0596b13&gt;] pnfs_generic_sync+0x13/0x20 [nfsv4]
    [&lt;ffffffffa0585188&gt;] nfs4_file_fsync+0x58/0x150 [nfsv4]
    [&lt;ffffffff81228e5b&gt;] vfs_fsync_range+0x4b/0xb0
    [&lt;ffffffff81228f1d&gt;] do_fsync+0x3d/0x70
    [&lt;ffffffff812291d0&gt;] SyS_fsync+0x10/0x20
    [&lt;ffffffff81757def&gt;] entry_SYSCALL_64_fastpath+0x12/0x76
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

v2, add missing include header

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unreferenced object 0xffffc90000abf000 (size 16900):
  comm "fsync02", pid 15765, jiffies 4297431627 (age 423.772s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 a0 c2 19 00 88 ff ff  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff8174d54e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811b9b91&gt;] __vmalloc_node_range+0x231/0x280
    [&lt;ffffffff811b9c2a&gt;] __vmalloc+0x4a/0x50
    [&lt;ffffffffa02c9ec1&gt;] ext_tree_prepare_commit+0x231/0x2e0 [blocklayoutdriver]
    [&lt;ffffffffa02c700e&gt;] bl_prepare_layoutcommit+0xe/0x10 [blocklayoutdriver]
    [&lt;ffffffffa0596a6c&gt;] pnfs_layoutcommit_inode+0x29c/0x330 [nfsv4]
    [&lt;ffffffffa0596b13&gt;] pnfs_generic_sync+0x13/0x20 [nfsv4]
    [&lt;ffffffffa0585188&gt;] nfs4_file_fsync+0x58/0x150 [nfsv4]
    [&lt;ffffffff81228e5b&gt;] vfs_fsync_range+0x4b/0xb0
    [&lt;ffffffff81228f1d&gt;] do_fsync+0x3d/0x70
    [&lt;ffffffff812291d0&gt;] SyS_fsync+0x10/0x20
    [&lt;ffffffff81757def&gt;] entry_SYSCALL_64_fastpath+0x12/0x76
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

v2, add missing include header

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs4: fix stateid handling for the NFS v4.2 operations</title>
<updated>2016-02-17T16:38:07+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-02-17T14:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4bdf87ebda016b864b388f96ae349e76983ebac4'/>
<id>4bdf87ebda016b864b388f96ae349e76983ebac4</id>
<content type='text'>
The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
use a helper called nfs42_set_rw_stateid to select a stateid that is sent
to the server.  But they don't set the inode and state fields in the
nfs4_exception structure, and this don't partake in the stateid recovery
protocol.  Because of this they will simply return errors insted of trying
to recover a stateid when the server return a BAD_STATEID error.

Additionally CLONE has the problem that it operates on two files and thus
two stateids, and thus needs to call the exception handler twice to
recover stateids.

While we're at it stop grabbing an addititional reference to the open
context in all these operations - having the file open guarantees that
the open context won't go away.

All this can be produces with the generic/168 and generic/170 tests in
xfstests which stress the CLONE stateid handling.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
use a helper called nfs42_set_rw_stateid to select a stateid that is sent
to the server.  But they don't set the inode and state fields in the
nfs4_exception structure, and this don't partake in the stateid recovery
protocol.  Because of this they will simply return errors insted of trying
to recover a stateid when the server return a BAD_STATEID error.

Additionally CLONE has the problem that it operates on two files and thus
two stateids, and thus needs to call the exception handler twice to
recover stateids.

While we're at it stop grabbing an addititional reference to the open
context in all these operations - having the file open guarantees that
the open context won't go away.

All this can be produces with the generic/168 and generic/170 tests in
xfstests which stress the CLONE stateid handling.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4: Fix a dentry leak on alias use</title>
<updated>2016-02-17T16:35:25+00:00</updated>
<author>
<name>Benjamin Coddington</name>
<email>bcodding@redhat.com</email>
</author>
<published>2016-02-17T15:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d9dfd8d741683347ee159d25f5b50c346a0df557'/>
<id>d9dfd8d741683347ee159d25f5b50c346a0df557</id>
<content type='text'>
In the case where d_add_unique() finds an appropriate alias to use it will
have already incremented the reference count.  An additional dget() to swap
the open context's dentry is unnecessary and will leak a reference.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Fixes: 275bb307865a3 ("NFSv4: Move dentry instantiation into the NFSv4-...")
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case where d_add_unique() finds an appropriate alias to use it will
have already incremented the reference count.  An additional dget() to swap
the open context's dentry is unnecessary and will leak a reference.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Fixes: 275bb307865a3 ("NFSv4: Move dentry instantiation into the NFSv4-...")
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pNFS: Always set NFS_LAYOUT_RETURN_REQUESTED with lo-&gt;plh_return_iomode</title>
<updated>2016-02-15T18:03:30+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-15T17:56:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e0fa0d0189f6be61343dbff1f71bef20125576e7'/>
<id>e0fa0d0189f6be61343dbff1f71bef20125576e7</id>
<content type='text'>
When setting the layout return mode, we must always also set the
NFS_LAYOUT_RETURN_REQUESTED flag to ensure that we send a layoutreturn.
Otherwise pnfs_error_mark_layout_for_return() could set the mode, but
fail to send the layoutreturn because another is already in flight.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When setting the layout return mode, we must always also set the
NFS_LAYOUT_RETURN_REQUESTED flag to ensure that we send a layoutreturn.
Otherwise pnfs_error_mark_layout_for_return() could set the mode, but
fail to send the layoutreturn because another is already in flight.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pNFS: Fix pnfs_mark_matching_lsegs_return()</title>
<updated>2016-02-15T17:56:01+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-15T17:36:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2f21596882f4a0edc387051910d56f8732970080'/>
<id>2f21596882f4a0edc387051910d56f8732970080</id>
<content type='text'>
We don't need to schedule a layoutreturn if the layout segment can
be freed immediately.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need to schedule a layoutreturn if the layout segment can
be freed immediately.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Cleanup - rename NFS_LAYOUT_RETURN_BEFORE_CLOSE</title>
<updated>2016-01-28T01:40:05+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-01-28T01:32:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2370abdab530718b61afc222c51901bdc2884ee2'/>
<id>2370abdab530718b61afc222c51901bdc2884ee2</id>
<content type='text'>
NFS_LAYOUT_RETURN_BEFORE_CLOSE is being used to signal that a
layoutreturn is needed, either due to a layout recall or to a
layout error. Rename it to NFS_LAYOUT_RETURN_REQUESTED in order
to clarify its purpose.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NFS_LAYOUT_RETURN_BEFORE_CLOSE is being used to signal that a
layoutreturn is needed, either due to a layout recall or to a
layout error. Rename it to NFS_LAYOUT_RETURN_REQUESTED in order
to clarify its purpose.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
