<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/callback_xdr.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-09-19T20:48:57Z</updated>
<entry>
<title>NFSv4.0 fix client reference leak in callback</title>
<updated>2018-09-19T20:48:57Z</updated>
<author>
<name>Olga Kornievskaia</name>
</author>
<published>2018-07-26T20:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d926fe3c2557d6b0e956fe26565823a48b15479'/>
<id>urn:sha1:2d926fe3c2557d6b0e956fe26565823a48b15479</id>
<content type='text'>
[ Upstream commit 32cd3ee511f4e07ca25d71163b50e704808d22f4 ]

If there is an error during processing of a callback message, it leads
to refrence leak on the client structure and eventually an unclean
superblock.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>NFS: Don't drop CB requests with invalid principals</title>
<updated>2016-10-07T13:23:45Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2016-06-29T17:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80468ac59605410aef0e1911ac61163a0367c82f'/>
<id>urn:sha1:80468ac59605410aef0e1911ac61163a0367c82f</id>
<content type='text'>
commit a4e187d83d88eeaba6252aac0a2ffe5eaa73a818 upstream.

Before commit 778be232a207 ("NFS do not find client in NFSv4
pg_authenticate"), the Linux callback server replied with
RPC_AUTH_ERROR / RPC_AUTH_BADCRED, instead of dropping the CB
request. Let's restore that behavior so the server has a chance to
do something useful about it, and provide a warning that helps
admins correct the problem.

Fixes: 778be232a207 ("NFS do not find client in NFSv4 ...")
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Tested-by: Steve Wise &lt;swise@opengridcomputing.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>
</entry>
<entry>
<title>SUNRPC: Fix callback channel</title>
<updated>2015-12-07T21:04:59Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-12-07T20:52:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=756b9b37cfb2e3dc76b2e43a8c097402ac736e07'/>
<id>urn:sha1:756b9b37cfb2e3dc76b2e43a8c097402ac736e07</id>
<content type='text'>
The NFSv4.1 callback channel is currently broken because the receive
message will keep shrinking because the backchannel receive buffer size
never gets reset.
The easiest solution to this problem is instead of changing the receive
buffer, to rather adjust the copied request.

Fixes: 38b7631fbe42 ("nfs4: limit callback decoding to received bytes")
Cc: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfs4: limit callback decoding to received bytes</title>
<updated>2015-11-24T03:03:15Z</updated>
<author>
<name>Benjamin Coddington</name>
</author>
<published>2015-11-20T14:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38b7631fbe42e6e247e9fc9879f961b14a687e3b'/>
<id>urn:sha1:38b7631fbe42e6e247e9fc9879f961b14a687e3b</id>
<content type='text'>
A truncated cb_compound request will cause the client to decode null or
data from a previous callback for nfs4.1 backchannel case, or uninitialized
data for the nfs4.0 case. This is because the path through
svc_process_common() advances the request's iov_base and decrements iov_len
without adjusting the overall xdr_buf's len field.  That causes
xdr_init_decode() to set up the xdr_stream with an incorrect length in
nfs4_callback_compound().

Fixing this for the nfs4.1 backchannel case first requires setting the
correct iov_len and page_len based on the length of received data in the
same manner as the nfs4.0 case.

Then the request's xdr_buf length can be adjusted for both cases based upon
the remaining iov_len and page_len.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Return directly if encode_sessionid fail</title>
<updated>2015-10-21T20:49:23Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-09-24T12:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0a63c0bfcc6f8283377258b5d892f88abd913c1'/>
<id>urn:sha1:e0a63c0bfcc6f8283377258b5d892f88abd913c1</id>
<content type='text'>
encode_sessionid() may return error, nfs needs process the return value.

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: Fix bad checking of max taglen in callback request</title>
<updated>2015-10-21T20:49:23Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-09-24T12:58:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=403889c0399c01a12877e3736ae1e96c9ded27be'/>
<id>urn:sha1:403889c0399c01a12877e3736ae1e96c9ded27be</id>
<content type='text'>
The taglen should be checked with CB_OP_TAGLEN_MAXSZ directly.

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: Fix bad defines of callback response maxsize</title>
<updated>2015-10-21T20:49:23Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-09-24T12:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45724e8a5b2a69b9524fd16ff73345fab9aae279'/>
<id>urn:sha1:45724e8a5b2a69b9524fd16ff73345fab9aae279</id>
<content type='text'>
As CB_OP_TAGLEN_MAXSZ, all XXX_MAXSZ should be defined as bit.
Each operation should not cantains CB_OP_TAGLEN_MAXSZ.

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: Use NFS4_MAX_SESSIONID_LEN directly for decode/encode sessionid</title>
<updated>2015-10-21T20:49:23Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-09-24T12:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=590184a6cea32c1f864a8e614f44e35a81a53fe0'/>
<id>urn:sha1:590184a6cea32c1f864a8e614f44e35a81a53fe0</id>
<content type='text'>
It's no need to define a temporary variables for NFS4_MAX_SESSIONID_LEN.

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: Get rid of the unneeded addr stored in callback arguments</title>
<updated>2015-10-21T20:49:22Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-09-24T12:55:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4e2ce096101bad9ca5bad3c27488905f91e30cb'/>
<id>urn:sha1:d4e2ce096101bad9ca5bad3c27488905f91e30cb</id>
<content type='text'>
Commit c36fca52f5 "NFS refactor nfs_find_client and reference client
across callback processing" has store clp in cb_process_state
which is set in cb_sequence.

So that, it's unneeded to store address pointer in any callback arguments.

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: Convert use of __constant_htonl to htonl</title>
<updated>2015-06-10T22:57:59Z</updated>
<author>
<name>Vaishali Thakkar</name>
</author>
<published>2015-06-10T14:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ed0d83d057c16efeca4210ba8fb2b5029333fb3'/>
<id>urn:sha1:4ed0d83d057c16efeca4210ba8fb2b5029333fb3</id>
<content type='text'>
In little endian cases, the macro htonl unfolds to __swab32 which
provides special case for constants. In big endian cases,
__constant_htonl and htonl expand directly to the same expression.
So, replace __constant_htonl with htonl with the goal of getting
rid of the definition of __constant_htonl completely.

The semantic patch that performs this transformation is as follows:

@@expression x;@@

- __constant_htonl(x)
+ htonl(x)

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