<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/sunrpc, branch linux-3.6.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>SUNRPC: Prevent races in xs_abort_connection()</title>
<updated>2012-10-31T17:09:57+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-10-23T21:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=eeaeb30f888f0872c029b441a69d67f43e712c80'/>
<id>eeaeb30f888f0872c029b441a69d67f43e712c80</id>
<content type='text'>
commit 4bc1e68ed6a8b59be8a79eb719be515a55c7bc68 upstream.

The call to xprt_disconnect_done() that is triggered by a successful
connection reset will trigger another automatic wakeup of all tasks
on the xprt-&gt;pending rpc_wait_queue. In particular it will cause an
early wake up of the task that called xprt_connect().

All we really want to do here is clear all the socket-specific state
flags, so we split that functionality out of xs_sock_mark_closed()
into a helper that can be called by xs_abort_connection()

Reported-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.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 4bc1e68ed6a8b59be8a79eb719be515a55c7bc68 upstream.

The call to xprt_disconnect_done() that is triggered by a successful
connection reset will trigger another automatic wakeup of all tasks
on the xprt-&gt;pending rpc_wait_queue. In particular it will cause an
early wake up of the task that called xprt_connect().

All we really want to do here is clear all the socket-specific state
flags, so we split that functionality out of xs_sock_mark_closed()
into a helper that can be called by xs_abort_connection()

Reported-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "SUNRPC: Ensure we close the socket on EPIPE errors too..."</title>
<updated>2012-10-31T17:09:57+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-10-23T15:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2edc5969320d6e7f13d6d74e9bd3d8c0b8ec3684'/>
<id>2edc5969320d6e7f13d6d74e9bd3d8c0b8ec3684</id>
<content type='text'>
commit b9d2bb2ee537424a7f855e1f93eed44eb9ee0854 upstream.

This reverts commit 55420c24a0d4d1fce70ca713f84aa00b6b74a70e.
Now that we clear the connected flag when entering TCP_CLOSE_WAIT,
the deadlock described in this commit is no longer possible.
Instead, the resulting call to xs_tcp_shutdown() can interfere
with pending reconnection attempts.

Reported-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.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 b9d2bb2ee537424a7f855e1f93eed44eb9ee0854 upstream.

This reverts commit 55420c24a0d4d1fce70ca713f84aa00b6b74a70e.
Now that we clear the connected flag when entering TCP_CLOSE_WAIT,
the deadlock described in this commit is no longer possible.
Instead, the resulting call to xs_tcp_shutdown() can interfere
with pending reconnection attempts.

Reported-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT</title>
<updated>2012-10-31T17:09:57+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-10-23T15:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a340197a85e4a27b3f974ffb6ab0308cc3f2edbc'/>
<id>a340197a85e4a27b3f974ffb6ab0308cc3f2edbc</id>
<content type='text'>
commit d0bea455dd48da1ecbd04fedf00eb89437455fdc upstream.

This is needed to ensure that we call xprt_connect() upon the next
call to call_connect().

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.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 d0bea455dd48da1ecbd04fedf00eb89437455fdc upstream.

This is needed to ensure that we call xprt_connect() upon the next
call to call_connect().

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Get rid of the xs_error_report socket callback</title>
<updated>2012-10-31T17:09:57+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-10-22T21:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=27d32c280df4953e2a28f8c8ff2d9491effa3a4c'/>
<id>27d32c280df4953e2a28f8c8ff2d9491effa3a4c</id>
<content type='text'>
commit f878b657ce8e7d3673afe48110ec208a29e38c4a upstream.

Chris Perl reports that we're seeing races between the wakeup call in
xs_error_report and the connect attempts. Basically, Chris has shown
that in certain circumstances, the call to xs_error_report causes the
rpc_task that is responsible for reconnecting to wake up early, thus
triggering a disconnect and retry.

Since the sk-&gt;sk_error_report() calls in the socket layer are always
followed by a tcp_done() in the cases where we care about waking up
the rpc_tasks, just let the state_change callbacks take responsibility
for those wake ups.

Reported-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.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 f878b657ce8e7d3673afe48110ec208a29e38c4a upstream.

Chris Perl reports that we're seeing races between the wakeup call in
xs_error_report and the connect attempts. Basically, Chris has shown
that in certain circumstances, the call to xs_error_report causes the
rpc_task that is responsible for reconnecting to wake up early, thus
triggering a disconnect and retry.

Since the sk-&gt;sk_error_report() calls in the socket layer are always
followed by a tcp_done() in the cases where we care about waking up
the rpc_tasks, just let the state_change callbacks take responsibility
for those wake ups.

Reported-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Chris Perl &lt;chris.perl@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Set alloc_slot for backchannel tcp ops</title>
<updated>2012-10-28T17:56:10+00:00</updated>
<author>
<name>Bryan Schumaker</name>
<email>bjschuma@netapp.com</email>
</author>
<published>2012-10-22T16:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3e75581ec02473059597582fa24cf077f0e20b1b'/>
<id>3e75581ec02473059597582fa24cf077f0e20b1b</id>
<content type='text'>
commit 84e28a307e376f271505af65a7b7e212dd6f61f4 upstream.

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport
regression) introduced the "alloc_slot" function for xprt operations,
but never created one for the backchannel operations.  This patch fixes
a null pointer dereference when mounting NFS over v4.1.

Call Trace:
 [&lt;ffffffffa0207957&gt;] ? xprt_reserve+0x47/0x50 [sunrpc]
 [&lt;ffffffffa02023a4&gt;] call_reserve+0x34/0x60 [sunrpc]
 [&lt;ffffffffa020e280&gt;] __rpc_execute+0x90/0x400 [sunrpc]
 [&lt;ffffffffa020e61a&gt;] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [&lt;ffffffff81073589&gt;] process_one_work+0x139/0x500
 [&lt;ffffffff81070e70&gt;] ? alloc_worker+0x70/0x70
 [&lt;ffffffffa020e5f0&gt;] ? __rpc_execute+0x400/0x400 [sunrpc]
 [&lt;ffffffff81073d1e&gt;] worker_thread+0x15e/0x460
 [&lt;ffffffff8145c839&gt;] ? preempt_schedule+0x49/0x70
 [&lt;ffffffff81073bc0&gt;] ? rescuer_thread+0x230/0x230
 [&lt;ffffffff81079603&gt;] kthread+0x93/0xa0
 [&lt;ffffffff81465d04&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff81079570&gt;] ? kthread_freezable_should_stop+0x70/0x70
 [&lt;ffffffff81465d00&gt;] ? gs_change+0x13/0x13

Signed-off-by: Bryan Schumaker &lt;bjschuma@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 84e28a307e376f271505af65a7b7e212dd6f61f4 upstream.

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport
regression) introduced the "alloc_slot" function for xprt operations,
but never created one for the backchannel operations.  This patch fixes
a null pointer dereference when mounting NFS over v4.1.

Call Trace:
 [&lt;ffffffffa0207957&gt;] ? xprt_reserve+0x47/0x50 [sunrpc]
 [&lt;ffffffffa02023a4&gt;] call_reserve+0x34/0x60 [sunrpc]
 [&lt;ffffffffa020e280&gt;] __rpc_execute+0x90/0x400 [sunrpc]
 [&lt;ffffffffa020e61a&gt;] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [&lt;ffffffff81073589&gt;] process_one_work+0x139/0x500
 [&lt;ffffffff81070e70&gt;] ? alloc_worker+0x70/0x70
 [&lt;ffffffffa020e5f0&gt;] ? __rpc_execute+0x400/0x400 [sunrpc]
 [&lt;ffffffff81073d1e&gt;] worker_thread+0x15e/0x460
 [&lt;ffffffff8145c839&gt;] ? preempt_schedule+0x49/0x70
 [&lt;ffffffff81073bc0&gt;] ? rescuer_thread+0x230/0x230
 [&lt;ffffffff81079603&gt;] kthread+0x93/0xa0
 [&lt;ffffffff81465d04&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff81079570&gt;] ? kthread_freezable_should_stop+0x70/0x70
 [&lt;ffffffff81465d00&gt;] ? gs_change+0x13/0x13

Signed-off-by: Bryan Schumaker &lt;bjschuma@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;

</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Prevent kernel stack corruption on long values of flush</title>
<updated>2012-10-28T17:56:10+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>levinsasha928@gmail.com</email>
</author>
<published>2012-07-16T22:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d702bf50186d554cff95c94f8d07ab5cc4e67aea'/>
<id>d702bf50186d554cff95c94f8d07ab5cc4e67aea</id>
<content type='text'>
commit 212ba90696ab4884e2025b0b13726d67aadc2cd4 upstream.

The buffer size in read_flush() is too small for the longest possible values
for it. This can lead to a kernel stack corruption:

[   43.047329] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff833e64b4
[   43.047329]
[   43.049030] Pid: 6015, comm: trinity-child18 Tainted: G        W    3.5.0-rc7-next-20120716-sasha #221
[   43.050038] Call Trace:
[   43.050435]  [&lt;ffffffff836c60c2&gt;] panic+0xcd/0x1f4
[   43.050931]  [&lt;ffffffff833e64b4&gt;] ? read_flush.isra.7+0xe4/0x100
[   43.051602]  [&lt;ffffffff810e94e6&gt;] __stack_chk_fail+0x16/0x20
[   43.052206]  [&lt;ffffffff833e64b4&gt;] read_flush.isra.7+0xe4/0x100
[   43.052951]  [&lt;ffffffff833e6500&gt;] ? read_flush_pipefs+0x30/0x30
[   43.053594]  [&lt;ffffffff833e652c&gt;] read_flush_procfs+0x2c/0x30
[   43.053596]  [&lt;ffffffff812b9a8c&gt;] proc_reg_read+0x9c/0xd0
[   43.053596]  [&lt;ffffffff812b99f0&gt;] ? proc_reg_write+0xd0/0xd0
[   43.053596]  [&lt;ffffffff81250d5b&gt;] do_loop_readv_writev+0x4b/0x90
[   43.053596]  [&lt;ffffffff81250fd6&gt;] do_readv_writev+0xf6/0x1d0
[   43.053596]  [&lt;ffffffff812510ee&gt;] vfs_readv+0x3e/0x60
[   43.053596]  [&lt;ffffffff812511b8&gt;] sys_readv+0x48/0xb0
[   43.053596]  [&lt;ffffffff8378167d&gt;] system_call_fastpath+0x1a/0x1f

Signed-off-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.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 212ba90696ab4884e2025b0b13726d67aadc2cd4 upstream.

The buffer size in read_flush() is too small for the longest possible values
for it. This can lead to a kernel stack corruption:

[   43.047329] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff833e64b4
[   43.047329]
[   43.049030] Pid: 6015, comm: trinity-child18 Tainted: G        W    3.5.0-rc7-next-20120716-sasha #221
[   43.050038] Call Trace:
[   43.050435]  [&lt;ffffffff836c60c2&gt;] panic+0xcd/0x1f4
[   43.050931]  [&lt;ffffffff833e64b4&gt;] ? read_flush.isra.7+0xe4/0x100
[   43.051602]  [&lt;ffffffff810e94e6&gt;] __stack_chk_fail+0x16/0x20
[   43.052206]  [&lt;ffffffff833e64b4&gt;] read_flush.isra.7+0xe4/0x100
[   43.052951]  [&lt;ffffffff833e6500&gt;] ? read_flush_pipefs+0x30/0x30
[   43.053594]  [&lt;ffffffff833e652c&gt;] read_flush_procfs+0x2c/0x30
[   43.053596]  [&lt;ffffffff812b9a8c&gt;] proc_reg_read+0x9c/0xd0
[   43.053596]  [&lt;ffffffff812b99f0&gt;] ? proc_reg_write+0xd0/0xd0
[   43.053596]  [&lt;ffffffff81250d5b&gt;] do_loop_readv_writev+0x4b/0x90
[   43.053596]  [&lt;ffffffff81250fd6&gt;] do_readv_writev+0xf6/0x1d0
[   43.053596]  [&lt;ffffffff812510ee&gt;] vfs_readv+0x3e/0x60
[   43.053596]  [&lt;ffffffff812511b8&gt;] sys_readv+0x48/0xb0
[   43.053596]  [&lt;ffffffff8378167d&gt;] system_call_fastpath+0x1a/0x1f

Signed-off-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT</title>
<updated>2012-10-21T16:32:40+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-09-12T20:49:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6324a752e0113df97f8a59902fcb22c38eede27f'/>
<id>6324a752e0113df97f8a59902fcb22c38eede27f</id>
<content type='text'>
commit a519fc7a70d1a918574bb826cc6905b87b482eb9 upstream.

Instead of doing a shutdown() call, we need to do an actual close().
Ditto if/when the server is sending us junk RPC headers.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Simon Kirby &lt;sim@hostway.ca&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 a519fc7a70d1a918574bb826cc6905b87b482eb9 upstream.

Instead of doing a shutdown() call, we need to do an actual close().
Ditto if/when the server is sending us junk RPC headers.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Tested-by: Simon Kirby &lt;sim@hostway.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'nfs-for-3.6-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2012-09-13T01:04:13+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-09-13T01:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=22b4e63ebe062e2e3d4a3a2b468e47ca9575d598'/>
<id>22b4e63ebe062e2e3d4a3a2b468e47ca9575d598</id>
<content type='text'>
Pull NFS client bugfixes from Trond Myklebust:

 - Final (hopefully) fix for the range checking code in NFSv4 getacl.
   This should fix the Oopses being seen when the acl size is close to
   PAGE_SIZE.
 - Fix a regression with the legacy binary mount code
 - Fix a regression in the readdir cookieverf initialisation
 - Fix an RPC over UDP regression
 - Ensure that we report all errors in the NFSv4 open code
 - Ensure that fsync() reports all relevant synchronisation errors.

* tag 'nfs-for-3.6-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: fsync() must exit with an error if page writeback failed
  SUNRPC: Fix a UDP transport regression
  NFS: return error from decode_getfh in decode open
  NFSv4: Fix buffer overflow checking in __nfs4_get_acl_uncached
  NFSv4: Fix range checking in __nfs4_get_acl_uncached and __nfs4_proc_set_acl
  NFS: Fix a problem with the legacy binary mount code
  NFS: Fix the initialisation of the readdir 'cookieverf' array
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull NFS client bugfixes from Trond Myklebust:

 - Final (hopefully) fix for the range checking code in NFSv4 getacl.
   This should fix the Oopses being seen when the acl size is close to
   PAGE_SIZE.
 - Fix a regression with the legacy binary mount code
 - Fix a regression in the readdir cookieverf initialisation
 - Fix an RPC over UDP regression
 - Ensure that we report all errors in the NFSv4 open code
 - Ensure that fsync() reports all relevant synchronisation errors.

* tag 'nfs-for-3.6-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: fsync() must exit with an error if page writeback failed
  SUNRPC: Fix a UDP transport regression
  NFS: return error from decode_getfh in decode open
  NFSv4: Fix buffer overflow checking in __nfs4_get_acl_uncached
  NFSv4: Fix range checking in __nfs4_get_acl_uncached and __nfs4_proc_set_acl
  NFS: Fix a problem with the legacy binary mount code
  NFS: Fix the initialisation of the readdir 'cookieverf' array
</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Fix a UDP transport regression</title>
<updated>2012-09-07T15:43:49+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-09-07T15:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f39c1bfb5a03e2d255451bff05be0d7255298fa4'/>
<id>f39c1bfb5a03e2d255451bff05be0d7255298fa4</id>
<content type='text'>
Commit 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (SUNRPC: Ensure that
we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing
hangs in the case of NFS over UDP mounts.

Since neither the UDP or the RDMA transport mechanism use dynamic slot
allocation, we can skip grabbing the socket lock for those transports.
Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA
case.

Note that the NFSv4.1 back channel assigns the slot directly
through rpc_run_bc_task, so we can ignore that case.

Reported-by: Dick Streefland &lt;dick.streefland@altium.nl&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Cc: stable@vger.kernel.org [&gt;= 3.1]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (SUNRPC: Ensure that
we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing
hangs in the case of NFS over UDP mounts.

Since neither the UDP or the RDMA transport mechanism use dynamic slot
allocation, we can skip grabbing the socket lock for those transports.
Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA
case.

Note that the NFSv4.1 back channel assigns the slot directly
through rpc_run_bc_task, so we can ignore that case.

Reported-by: Dick Streefland &lt;dick.streefland@altium.nl&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Cc: stable@vger.kernel.org [&gt;= 3.1]
</pre>
</div>
</content>
</entry>
<entry>
<title>svcrpc: fix svc_xprt_enqueue/svc_recv busy-looping</title>
<updated>2012-08-20T22:39:19+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2012-08-17T21:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d10f27a750312ed5638c876e4bd6aa83664cccd8'/>
<id>d10f27a750312ed5638c876e4bd6aa83664cccd8</id>
<content type='text'>
The rpc server tries to ensure that there will be room to send a reply
before it receives a request.

It does this by tracking, in xpt_reserved, an upper bound on the total
size of the replies that is has already committed to for the socket.

Currently it is adding in the estimate for a new reply *before* it
checks whether there is space available.  If it finds that there is not
space, it then subtracts the estimate back out.

This may lead the subsequent svc_xprt_enqueue to decide that there is
space after all.

The results is a svc_recv() that will repeatedly return -EAGAIN, causing
server threads to loop without doing any actual work.

Cc: stable@vger.kernel.org
Reported-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Tested-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The rpc server tries to ensure that there will be room to send a reply
before it receives a request.

It does this by tracking, in xpt_reserved, an upper bound on the total
size of the replies that is has already committed to for the socket.

Currently it is adding in the estimate for a new reply *before* it
checks whether there is space available.  If it finds that there is not
space, it then subtracts the estimate back out.

This may lead the subsequent svc_xprt_enqueue to decide that there is
space after all.

The results is a svc_recv() that will repeatedly return -EAGAIN, causing
server threads to loop without doing any actual work.

Cc: stable@vger.kernel.org
Reported-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Tested-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
