<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sunrpc/clnt.c, branch linux-4.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-05-17T09:11:45Z</updated>
<entry>
<title>SUNRPC: remove the maximum number of retries in call_bind_status</title>
<updated>2023-05-17T09:11:45Z</updated>
<author>
<name>Dai Ngo</name>
</author>
<published>2023-04-18T20:19:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63126caaa8ff0d26686bfff8df541e09fb27d6d1'/>
<id>urn:sha1:63126caaa8ff0d26686bfff8df541e09fb27d6d1</id>
<content type='text'>
[ Upstream commit 691d0b782066a6eeeecbfceb7910a8f6184e6105 ]

Currently call_bind_status places a hard limit of 3 to the number of
retries on EACCES error. This limit was done to prevent NLM unlock
requests from being hang forever when the server keeps returning garbage.
However this change causes problem for cases when NLM service takes
longer than 9 seconds to register with the port mapper after a restart.

This patch removes this hard coded limit and let the RPC handles
the retry based on the standard hard/soft task semantics.

Fixes: 0b760113a3a1 ("NLM: Don't hang forever on NLM unlock requests")
Reported-by: Helen Chao &lt;helen.chao@oracle.com&gt;
Tested-by: Helen Chao &lt;helen.chao@oracle.com&gt;
Signed-off-by: Dai Ngo &lt;dai.ngo@oracle.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Fix missing release socket in rpc_sockname()</title>
<updated>2023-01-18T08:26:16Z</updated>
<author>
<name>Wang ShaoBo</name>
</author>
<published>2022-11-24T09:23:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68ee72bc3d11c5df3c5d44718419b5991e39cb09'/>
<id>urn:sha1:68ee72bc3d11c5df3c5d44718419b5991e39cb09</id>
<content type='text'>
[ Upstream commit 50fa355bc0d75911fe9d5072a5ba52cdb803aff7 ]

socket dynamically created is not released when getting an unintended
address family type in rpc_sockname(), direct to out_release for calling
sock_release().

Fixes: 2e738fdce22f ("SUNRPC: Add API to acquire source address")
Signed-off-by: Wang ShaoBo &lt;bobo.shaobowang@huawei.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net :sunrpc :clnt :Fix xps refcount imbalance on the error path</title>
<updated>2019-07-21T07:04:29Z</updated>
<author>
<name>Lin Yi</name>
</author>
<published>2019-06-10T02:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5636cbbe30c5895bc62a3fb030e9992e651141be'/>
<id>urn:sha1:5636cbbe30c5895bc62a3fb030e9992e651141be</id>
<content type='text'>
[ Upstream commit b96226148491505318228ac52624956bd98f9e0c ]

rpc_clnt_add_xprt take a reference to struct rpc_xprt_switch, but forget
to release it before return, may lead to a memory leak.

Signed-off-by: Lin Yi &lt;teroincn@163.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>NFSv4 client live hangs after live data migration recovery</title>
<updated>2018-09-09T17:55:59Z</updated>
<author>
<name>Bill Baker</name>
</author>
<published>2018-06-19T21:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf23ba3737e097d80363b5f5aea6239a952a36a9'/>
<id>urn:sha1:bf23ba3737e097d80363b5f5aea6239a952a36a9</id>
<content type='text'>
commit 0f90be132cbf1537d87a6a8b9e80867adac892f6 upstream.

After a live data migration event at the NFS server, the client may send
I/O requests to the wrong server, causing a live hang due to repeated
recovery events.  On the wire, this will appear as an I/O request failing
with NFS4ERR_BADSESSION, followed by successful CREATE_SESSION, repeatedly.
NFS4ERR_BADSSESSION is returned because the session ID being used was
issued by the other server and is not valid at the old server.

The failure is caused by async worker threads having cached the transport
(xprt) in the rpc_task structure.  After the migration recovery completes,
the task is redispatched and the task resends the request to the wrong
server based on the old value still present in tk_xprt.

The solution is to recompute the tk_xprt field of the rpc_task structure
so that the request goes to the correct server.

Signed-off-by: Bill Baker &lt;bill.baker@oracle.com&gt;
Reviewed-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Tested-by: Helen Chao &lt;helen.chao@oracle.com&gt;
Fixes: fb43d17210ba ("SUNRPC: Use the multipath iterator to assign a ...")
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SUNRPC: remove some dead code.</title>
<updated>2017-09-06T16:31:15Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2017-08-18T07:12:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1ecbc21eb097ecf0b73793c44b0197584db9e2c'/>
<id>urn:sha1:f1ecbc21eb097ecf0b73793c44b0197584db9e2c</id>
<content type='text'>
RPC_TASK_NO_RETRANS_TIMEOUT is set when cl_noretranstimeo
is set, which happens when  RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT is set,
which happens when NFS_CS_NO_RETRANS_TIMEOUT is set.

This flag means "don't resend on a timeout, only resend if the
connection gets broken for some reason".

cl_discrtry is set when RPC_CLNT_CREATE_DISCRTRY is set, which
happens when NFS_CS_DISCRTRY is set.

This flag means "always disconnect before resending".

NFS_CS_NO_RETRANS_TIMEOUT and NFS_CS_DISCRTRY are both only set
in nfs4_init_client(), and it always sets both.

So we will never have a situation where only one of the flags is set.
So this code, which tests if timeout retransmits are allowed, and
disconnection is required, will never run.

So it makes sense to remove this code as it cannot be tested and
could confuse people reading the code (like me).

(alternately we could leave it there with a comment saying
 it is never actually used).

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: ECONNREFUSED should cause a rebind.</title>
<updated>2017-08-20T16:39:28Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2017-08-18T07:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd01b2597941d9c17980222999b0721648b383b8'/>
<id>urn:sha1:fd01b2597941d9c17980222999b0721648b383b8</id>
<content type='text'>
If you
 - mount and NFSv3 filesystem
 - do some file locking which requires the server
   to make a GRANT call back
 - unmount
 - mount again and do the same locking

then the second attempt at locking suffers a 30 second delay.
Unmounting and remounting causes lockd to stop and restart,
which causes it to bind to a new port.
The server still thinks the old port is valid and gets ECONNREFUSED
when trying to contact it.
ECONNREFUSED should be seen as a hard error that is not worth
retrying.  Rebinding is the only reasonable response.

This patch forces a rebind if that makes sense.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: mark all struct rpc_procinfo instances as const</title>
<updated>2017-05-15T15:42:20Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2017-05-12T13:36:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=499b4988109e91b76f231fb1b4f1e53ec3260686'/>
<id>urn:sha1:499b4988109e91b76f231fb1b4f1e53ec3260686</id>
<content type='text'>
struct rpc_procinfo contains function pointers, and marking it as
constant avoids it being able to be used as an attach vector for
code injections.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: move p_count out of struct rpc_procinfo</title>
<updated>2017-05-15T15:42:18Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2017-05-08T21:27:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c5876ddbdb401f814ef717394826e7dfb6704d4'/>
<id>urn:sha1:1c5876ddbdb401f814ef717394826e7dfb6704d4</id>
<content type='text'>
p_count is the only writeable memeber of struct rpc_procinfo, which is
a good candidate to be const-ified as it contains function pointers.

This patch moves it into out out struct rpc_procinfo, and into a
separate writable array that is pointed to by struct rpc_version and
indexed by p_statidx.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>sunrpc: properly type argument to kxdrdproc_t</title>
<updated>2017-05-15T15:42:12Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2017-05-08T12:58:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73c8dc133afb0cbe72a9234894ea72c2a0e71a73'/>
<id>urn:sha1:73c8dc133afb0cbe72a9234894ea72c2a0e71a73</id>
<content type='text'>
Pass struct rpc_request as the first argument instead of an untyped blob.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: properly type argument to kxdreproc_t</title>
<updated>2017-05-15T15:42:07Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2017-05-08T07:31:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c512f36b581862df20acef050c3e1a875166bd6f'/>
<id>urn:sha1:c512f36b581862df20acef050c3e1a875166bd6f</id>
<content type='text'>
Pass struct rpc_request as the first argument instead of an untyped blob,
and mark the data object as const.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
</entry>
</feed>
