<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs/file.c, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-02-20T09:29:08Z</updated>
<entry>
<title>CIFS: Fix error paths in writeback code</title>
<updated>2019-02-20T09:29:08Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2019-01-08T19:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5443a09712e7962a10d8f5801a1cc4598aaa2966'/>
<id>urn:sha1:5443a09712e7962a10d8f5801a1cc4598aaa2966</id>
<content type='text'>
[ Upstream commit 9a66396f1857cc1de06f4f4771797315e1a4ea56 ]

This patch aims to address writeback code problems related to error
paths. In particular it respects EINTR and related error codes and
stores and returns the first error occurred during writeback.

Signed-off-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Acked-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: Limit memory used by lock request calls to a page</title>
<updated>2019-02-20T09:29:07Z</updated>
<author>
<name>Ross Lagerwall</name>
</author>
<published>2019-01-08T18:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3c42f9b10ce13bd52b167c045399df1619b5080'/>
<id>urn:sha1:f3c42f9b10ce13bd52b167c045399df1619b5080</id>
<content type='text'>
[ Upstream commit 92a8109e4d3a34fb6b115c9098b51767dc933444 ]

The code tries to allocate a contiguous buffer with a size supplied by
the server (maxBuf). This could fail if memory is fragmented since it
results in high order allocations for commonly used server
implementations. It is also wasteful since there are probably
few locks in the usual case. Limit the buffer to be no larger than a
page to avoid memory allocation failures due to fragmentation.

Signed-off-by: Ross Lagerwall &lt;ross.lagerwall@citrix.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>CIFS: Fix possible oops and memory leaks in async IO</title>
<updated>2019-02-06T16:27:39Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2019-01-24T01:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd4a745d51c52893cdd31799fc148b629a62bf62'/>
<id>urn:sha1:fd4a745d51c52893cdd31799fc148b629a62bf62</id>
<content type='text'>
commit 9bda8723da2d55b1de833b98cf802b88006e5b69 upstream.

Allocation of a page array for non-cached IO was separated from
allocation of rdata and wdata structures and this introduced memory
leaks and a possible null pointer dereference. This patch fixes
these problems.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: Fix potential OOB access of lock element array</title>
<updated>2019-01-16T21:03:22Z</updated>
<author>
<name>Ross Lagerwall</name>
</author>
<published>2019-01-08T18:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab613718d8bf175cbd983d19988b3b3c43edacbd'/>
<id>urn:sha1:ab613718d8bf175cbd983d19988b3b3c43edacbd</id>
<content type='text'>
commit b9a74cde94957d82003fb9f7ab4777938ca851cd upstream.

If maxBuf is small but non-zero, it could result in a zero sized lock
element array which we would then try and access OOB.

Signed-off-by: Ross Lagerwall &lt;ross.lagerwall@citrix.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: use the correct length when pinning memory for direct I/O for write</title>
<updated>2019-01-09T16:46:03Z</updated>
<author>
<name>Long Li</name>
</author>
<published>2018-12-16T23:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9d01620ae79b26ae4e5b021c2fb36005ae05864'/>
<id>urn:sha1:d9d01620ae79b26ae4e5b021c2fb36005ae05864</id>
<content type='text'>
commit b6bc8a7b993e62f82415a5e3e4a6469e80fea19c upstream.

The current code attempts to pin memory using the largest possible wsize
based on the currect SMB credits. This doesn't cause kernel oops but this
is not optimal as we may pin more pages then actually needed.

Fix this by only pinning what are needed for doing this write I/O.

Signed-off-by: Long Li &lt;longli@microsoft.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reviewed-by: Joey Pabalinas &lt;joeypabalinas@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: return correct errors when pinning memory failed for direct I/O</title>
<updated>2019-01-09T16:46:03Z</updated>
<author>
<name>Long Li</name>
</author>
<published>2018-12-16T22:41:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22d99eb586eefb243f0e0959ff6ad6e507d266fc'/>
<id>urn:sha1:22d99eb586eefb243f0e0959ff6ad6e507d266fc</id>
<content type='text'>
commit 54e94ff94eac887ddb59cfd46b18896da5695e35 upstream.

When pinning memory failed, we should return the correct error code and
rewind the SMB credits.

Reported-by: Murphy Zhou &lt;jencce.kernel@gmail.com&gt;
Signed-off-by: Long Li &lt;longli@microsoft.com&gt;
Cc: stable@vger.kernel.org
Cc: Murphy Zhou &lt;jencce.kernel@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: Avoid returning EBUSY to upper layer VFS</title>
<updated>2018-12-07T06:59:23Z</updated>
<author>
<name>Long Li</name>
</author>
<published>2018-12-06T04:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ac79291fb7dae4402b306789b1cb85f84687e44'/>
<id>urn:sha1:6ac79291fb7dae4402b306789b1cb85f84687e44</id>
<content type='text'>
EBUSY is not handled by VFS, and will be passed to user-mode. This is not
correct as we need to wait for more credits.

This patch also fixes a bug where rsize or wsize is used uninitialized when
the call to server-&gt;ops-&gt;wait_mtu_credits() fails.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Long Li &lt;longli@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reviewed-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: fix signed/unsigned mismatch on aio_read patch</title>
<updated>2018-11-02T19:09:42Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2018-11-01T15:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b98e26df07549d4649ac5b8f24c49f5c722bbc7e'/>
<id>urn:sha1:b98e26df07549d4649ac5b8f24c49f5c722bbc7e</id>
<content type='text'>
The patch "CIFS: Add support for direct I/O read" had
a signed/unsigned mismatch (ssize_t vs. size_t) in the
return from one function.  Similar trivial change
in aio_write

Signed-off-by: Long Li &lt;longli@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reported-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
</content>
</entry>
<entry>
<title>CIFS: Add support for direct I/O write</title>
<updated>2018-11-02T19:09:42Z</updated>
<author>
<name>Long Li</name>
</author>
<published>2018-10-31T22:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c5f9c1ab7cb45f6584ce312b14fb310a8fa28f3'/>
<id>urn:sha1:8c5f9c1ab7cb45f6584ce312b14fb310a8fa28f3</id>
<content type='text'>
With direct I/O write, user supplied buffers are pinned to the memory and data
are transferred directly from user buffers to the transport layer.

Change in v3: add support for kernel AIO

Change in v4:
Refactor common write code to __cifs_writev for direct and non-direct I/O.
Retry on direct I/O failure.

Signed-off-by: Long Li &lt;longli@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>CIFS: Add support for direct I/O read</title>
<updated>2018-11-02T19:09:41Z</updated>
<author>
<name>Long Li</name>
</author>
<published>2018-10-31T22:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e6e2b86c29c6fcfa16ad9fdc7ea32027bea5d73'/>
<id>urn:sha1:6e6e2b86c29c6fcfa16ad9fdc7ea32027bea5d73</id>
<content type='text'>
With direct I/O read, we transfer the data directly from transport layer to
the user data buffer.

Change in v3: add support for kernel AIO

Change in v4:
Refactor common read code to __cifs_readv for direct and non-direct I/O.
Retry on direct I/O failure.

Signed-off-by: Long Li &lt;longli@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
