<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/fs/nfs/nfs4proc.c, branch dev</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-07-28T16:37:44+00:00</updated>
<entry>
<title>Merge tag 'nfs-for-4.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2015-07-28T16:37:44+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-28T16:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d8132e08d25a47e2d5156aa2268cd1cd9b0d6c0d'/>
<id>urn:sha1:d8132e08d25a47e2d5156aa2268cd1cd9b0d6c0d</id>
<content type='text'>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

  Stable patches:
   - Fix a situation where the client uses the wrong (zero) stateid.
   - Fix a memory leak in nfs_do_recoalesce

  Bugfixes:
   - Plug a memory leak when -&gt;prepare_layoutcommit fails
   - Fix an Oops in the NFSv4 open code
   - Fix a backchannel deadlock
   - Fix a livelock in sunrpc when sendmsg fails due to low memory
     availability
   - Don't revalidate the mapping if both size and change attr are up to
     date
   - Ensure we don't miss a file extension when doing pNFS
   - Several fixes to handle NFSv4.1 sequence operation status bits
     correctly
   - Several pNFS layout return bugfixes"

* tag 'nfs-for-4.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (28 commits)
  nfs: Fix an oops caused by using other thread's stack space in ASYNC mode
  nfs: plug memory leak when -&gt;prepare_layoutcommit fails
  SUNRPC: Report TCP errors to the caller
  sunrpc: translate -EAGAIN to -ENOBUFS when socket is writable.
  NFSv4.2: handle NFS-specific llseek errors
  NFS: Don't clear desc-&gt;pg_moreio in nfs_do_recoalesce()
  NFS: Fix a memory leak in nfs_do_recoalesce
  NFS: nfs_mark_for_revalidate should always set NFS_INO_REVAL_PAGECACHE
  NFS: Remove the "NFS_CAP_CHANGE_ATTR" capability
  NFS: Set NFS_INO_REVAL_PAGECACHE if the change attribute is uninitialised
  NFS: Don't revalidate the mapping if both size and change attr are up to date
  NFSv4/pnfs: Ensure we don't miss a file extension
  NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked
  SUNRPC: xprt_complete_bc_request must also decrement the free slot count
  SUNRPC: Fix a backchannel deadlock
  pNFS: Don't throw out valid layout segments
  pNFS: pnfs_roc_drain() fix a race with open
  pNFS: Fix races between return-on-close and layoutreturn.
  pNFS: pnfs_roc_drain should return 'true' when sleeping
  pNFS: Layoutreturn must invalidate all existing layout segments.
  ...
</content>
</entry>
<entry>
<title>nfs: Fix an oops caused by using other thread's stack space in ASYNC mode</title>
<updated>2015-07-28T13:07:03+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2015-07-27T07:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a49c269111a5b3c1fd2a98f36fa27423b94549f8'/>
<id>urn:sha1:a49c269111a5b3c1fd2a98f36fa27423b94549f8</id>
<content type='text'>
An oops caused by using other thread's stack space in sunrpc ASYNC sending thread.

[ 9839.007187] ------------[ cut here ]------------
[ 9839.007923] kernel BUG at fs/nfs/nfs4xdr.c:910!
[ 9839.008069] invalid opcode: 0000 [#1] SMP
[ 9839.008069] Modules linked in: blocklayoutdriver rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm joydev iosf_mbi crct10dif_pclmul snd_timer crc32_pclmul crc32c_intel ghash_clmulni_intel snd soundcore ppdev pvpanic parport_pc i2c_piix4 serio_raw virtio_balloon parport acpi_cpufreq nfsd nfs_acl lockd grace auth_rpcgss sunrpc qxl drm_kms_helper virtio_net virtio_console virtio_blk ttm drm virtio_pci virtio_ring virtio ata_generic pata_acpi
[ 9839.008069] CPU: 0 PID: 308 Comm: kworker/0:1H Not tainted 4.0.0-0.rc4.git1.3.fc23.x86_64 #1
[ 9839.008069] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 9839.008069] Workqueue: rpciod rpc_async_schedule [sunrpc]
[ 9839.008069] task: ffff8800d8b4d8e0 ti: ffff880036678000 task.ti: ffff880036678000
[ 9839.008069] RIP: 0010:[&lt;ffffffffa0339cc9&gt;]  [&lt;ffffffffa0339cc9&gt;] reserve_space.part.73+0x9/0x10 [nfsv4]
[ 9839.008069] RSP: 0018:ffff88003667ba58  EFLAGS: 00010246
[ 9839.008069] RAX: 0000000000000000 RBX: 000000001fc15e18 RCX: ffff8800c0193800
[ 9839.008069] RDX: ffff8800e4ae3f24 RSI: 000000001fc15e2c RDI: ffff88003667bcd0
[ 9839.008069] RBP: ffff88003667ba58 R08: ffff8800d9173008 R09: 0000000000000003
[ 9839.008069] R10: ffff88003667bcd0 R11: 000000000000000c R12: 0000000000010000
[ 9839.008069] R13: ffff8800d9173350 R14: 0000000000000000 R15: ffff8800c0067b98
[ 9839.008069] FS:  0000000000000000(0000) GS:ffff88011fc00000(0000) knlGS:0000000000000000
[ 9839.008069] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9839.008069] CR2: 00007f988c9c8bb0 CR3: 00000000d99b6000 CR4: 00000000000407f0
[ 9839.008069] Stack:
[ 9839.008069]  ffff88003667bbc8 ffffffffa03412c5 00000000c6c55680 ffff880000000003
[ 9839.008069]  0000000000000088 00000010c6c55680 0001000000000002 ffffffff816e87e9
[ 9839.008069]  0000000000000000 00000000477290e2 ffff88003667bab8 ffffffff81327ba3
[ 9839.008069] Call Trace:
[ 9839.008069]  [&lt;ffffffffa03412c5&gt;] encode_attrs+0x435/0x530 [nfsv4]
[ 9839.008069]  [&lt;ffffffff816e87e9&gt;] ? inet_sendmsg+0x69/0xb0
[ 9839.008069]  [&lt;ffffffff81327ba3&gt;] ? selinux_socket_sendmsg+0x23/0x30
[ 9839.008069]  [&lt;ffffffff8164c1df&gt;] ? do_sock_sendmsg+0x9f/0xc0
[ 9839.008069]  [&lt;ffffffff8164c278&gt;] ? kernel_sendmsg+0x58/0x70
[ 9839.008069]  [&lt;ffffffffa011acc0&gt;] ? xdr_reserve_space+0x20/0x170 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa011acc0&gt;] ? xdr_reserve_space+0x20/0x170 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa0341b40&gt;] ? nfs4_xdr_enc_open_noattr+0x130/0x130 [nfsv4]
[ 9839.008069]  [&lt;ffffffffa03419a5&gt;] encode_open+0x2d5/0x340 [nfsv4]
[ 9839.008069]  [&lt;ffffffffa0341b40&gt;] ? nfs4_xdr_enc_open_noattr+0x130/0x130 [nfsv4]
[ 9839.008069]  [&lt;ffffffffa011ab89&gt;] ? xdr_encode_opaque+0x19/0x20 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa0339cfb&gt;] ? encode_string+0x2b/0x40 [nfsv4]
[ 9839.008069]  [&lt;ffffffffa0341bf3&gt;] nfs4_xdr_enc_open+0xb3/0x140 [nfsv4]
[ 9839.008069]  [&lt;ffffffffa0110a4c&gt;] rpcauth_wrap_req+0xac/0xf0 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa01017db&gt;] call_transmit+0x18b/0x2d0 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa0101650&gt;] ? call_decode+0x860/0x860 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa0101650&gt;] ? call_decode+0x860/0x860 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa010caa0&gt;] __rpc_execute+0x90/0x460 [sunrpc]
[ 9839.008069]  [&lt;ffffffffa010ce85&gt;] rpc_async_schedule+0x15/0x20 [sunrpc]
[ 9839.008069]  [&lt;ffffffff810b452b&gt;] process_one_work+0x1bb/0x410
[ 9839.008069]  [&lt;ffffffff810b47d3&gt;] worker_thread+0x53/0x470
[ 9839.008069]  [&lt;ffffffff810b4780&gt;] ? process_one_work+0x410/0x410
[ 9839.008069]  [&lt;ffffffff810b4780&gt;] ? process_one_work+0x410/0x410
[ 9839.008069]  [&lt;ffffffff810ba7b8&gt;] kthread+0xd8/0xf0
[ 9839.008069]  [&lt;ffffffff810ba6e0&gt;] ? kthread_worker_fn+0x180/0x180
[ 9839.008069]  [&lt;ffffffff81786418&gt;] ret_from_fork+0x58/0x90
[ 9839.008069]  [&lt;ffffffff810ba6e0&gt;] ? kthread_worker_fn+0x180/0x180
[ 9839.008069] Code: 00 00 48 c7 c7 21 fa 37 a0 e8 94 1c d6 e0 c6 05 d2 17 05 00 01 8b 03 eb d7 66 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 e5 &lt;0f&gt; 0b 0f 1f 44 00 00 66 66 66 66 90 55 48 89 e5 41 54 53 89 f3
[ 9839.008069] RIP  [&lt;ffffffffa0339cc9&gt;] reserve_space.part.73+0x9/0x10 [nfsv4]
[ 9839.008069]  RSP &lt;ffff88003667ba58&gt;
[ 9839.071114] ---[ end trace cc14c03adb522e94 ]---

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Remove the "NFS_CAP_CHANGE_ATTR" capability</title>
<updated>2015-07-22T21:15:54+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-07-05T15:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=cd812599796f500b042f5464b6665755eca21137'/>
<id>urn:sha1:cd812599796f500b042f5464b6665755eca21137</id>
<content type='text'>
Setting the change attribute has been mandatory for all NFS versions, since
commit 3a1556e8662c ("NFSv2/v3: Simulate the change attribute"). We should
therefore not have anything be conditional on it being set/unset.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked</title>
<updated>2015-07-22T21:10:51+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-07-22T17:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3c38cbe2ade88240fabb585b408f779ad3b9a31b'/>
<id>urn:sha1:3c38cbe2ade88240fabb585b408f779ad3b9a31b</id>
<content type='text'>
Otherwise, nfs4_select_rw_stateid() will always return the zero stateid
instead of the correct open stateid.

Fixes: f95549cf24660 ("NFSv4: More CLOSE/OPEN races")
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfs4: have do_vfs_lock take an inode pointer</title>
<updated>2015-07-13T10:29:11+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jeff.layton@primarydata.com</email>
</author>
<published>2015-07-11T10:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=83bfff23e9ed19f37c4ef0bba84e75bd88e5cf21'/>
<id>urn:sha1:83bfff23e9ed19f37c4ef0bba84e75bd88e5cf21</id>
<content type='text'>
Now that we have file locking helpers that can deal with an inode
instead of a filp, we can change the NFSv4 locking code to use that
instead.

This should fix the case where we have a filp that is closed while flock
or OFD locks are set on it, and the task is signaled so that it doesn't
wait for the LOCKU reply to come in before the filp is freed. At that
point we can end up with a use-after-free with the current code, which
relies on dereferencing the fl_file in the lock request.

Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Reviewed-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Tested-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
</content>
</entry>
<entry>
<title>Revert "nfs: take extra reference to fl-&gt;fl_file when running a LOCKU operation"</title>
<updated>2015-07-13T10:29:11+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jeff.layton@primarydata.com</email>
</author>
<published>2015-07-11T10:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ed056764271e71004b3118619de1ebfefb2acf6b'/>
<id>urn:sha1:ed056764271e71004b3118619de1ebfefb2acf6b</id>
<content type='text'>
This reverts commit db2efec0caba4f81a22d95a34da640b86c313c8e.

William reported that he was seeing instability with this patch, which
is likely due to the fact that it can cause the kernel to take a new
reference to a filp after the last reference has already been put.

Revert this patch for now, as we'll need to fix this in another way.

Cc: stable@vger.kernel.org
Reported-by: William Dauchy &lt;william@gandi.net&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Reviewed-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Tested-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
</content>
</entry>
<entry>
<title>pNFS: Fix races between return-on-close and layoutreturn.</title>
<updated>2015-07-11T14:16:16+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-07-09T16:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7f27392cd4cbcadeeaff9eedebcaec8fae9aec8e'/>
<id>urn:sha1:7f27392cd4cbcadeeaff9eedebcaec8fae9aec8e</id>
<content type='text'>
If one or more of the layout segments reports an error during I/O, then
we may have to send a layoutreturn to report the error back to the NFS
metadata server.
This patch ensures that the return-on-close code can detect the
outstanding layoutreturn, and not preempt it.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>pNFS: Layoutreturn must invalidate all existing layout segments.</title>
<updated>2015-07-11T14:16:16+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-07-09T15:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c5d73716e95d510c0655272ce44f318932309cb1'/>
<id>urn:sha1:c5d73716e95d510c0655272ce44f318932309cb1</id>
<content type='text'>
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: Leases are renewed in sequence_done when we have sessions</title>
<updated>2015-07-05T19:50:19+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-07-05T18:50:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=be824167e33a8b747423c90f72479deb03255d54'/>
<id>urn:sha1:be824167e33a8b747423c90f72479deb03255d54</id>
<content type='text'>
Ensure that the calls to renew_lease() in open_done() etc. only apply
to session-less versions of NFSv4.x (i.e. NFSv4.0).

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFSv4.1: nfs41_sequence_done should handle sequence flag errors</title>
<updated>2015-07-05T19:50:19+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-07-05T19:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=b15c7cdde4991be5058f442c6d08d404d56f662c'/>
<id>urn:sha1:b15c7cdde4991be5058f442c6d08d404d56f662c</id>
<content type='text'>
Instead of just kicking off lease recovery, we should look into the
sequence flag errors and handle them.

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