<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs, branch linux-4.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-09-07T06:37:15Z</updated>
<entry>
<title>CIFS: remove endian related sparse warning</title>
<updated>2017-09-07T06:37:15Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2017-08-27T21:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77ab9e7fb4312d3b377690660f757d900fa9e171'/>
<id>urn:sha1:77ab9e7fb4312d3b377690660f757d900fa9e171</id>
<content type='text'>
commit 6e3c1529c39e92ed64ca41d53abadabbaa1d5393 upstream.

Recent patch had an endian warning ie
cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup()

Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
CC: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Acked-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: Fix maximum SMB2 header size</title>
<updated>2017-09-07T06:37:15Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2017-08-24T22:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0627f7136685595b33a20855630ce517b65fe55c'/>
<id>urn:sha1:0627f7136685595b33a20855630ce517b65fe55c</id>
<content type='text'>
commit 9e37b1784f2be9397a903307574ee565bbadfd75 upstream.

Currently the maximum size of SMB2/3 header is set incorrectly which
leads to hanging of directory listing operations on encrypted SMB3
connections. Fix this by setting the maximum size to 170 bytes that
is calculated as RFC1002 length field size (4) + transform header
size (52) + SMB2 header size (64) + create response size (56).

Signed-off-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Acked-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup()</title>
<updated>2017-08-30T08:26:38Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2017-08-23T04:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea5745a5117fd1e1cbd4497ea51367b10e3881f0'/>
<id>urn:sha1:ea5745a5117fd1e1cbd4497ea51367b10e3881f0</id>
<content type='text'>
commit d3edede29f74d335f81d95a4588f5f136a9f7dcf upstream.

Add checking for the path component length and verify it is &lt;= the maximum
that the server advertizes via FileFsAttributeInformation.

With this patch cifs.ko will now return ENAMETOOLONG instead of ENOENT
when users to access an overlong path.

To test this, try to cd into a (non-existing) directory on a CIFS share
that has a too long name:
cd /mnt/aaaaaaaaaaaaaaa...

and it now should show a good error message from the shell:
bash: cd: /mnt/aaaaaaaaaaaaaaaa...aaaaaa: File name too long

rh bz 1153996

Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: Fix df output for users with quota limits</title>
<updated>2017-08-30T08:26:38Z</updated>
<author>
<name>Sachin Prabhu</name>
</author>
<published>2017-08-03T07:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bc1c4391b7909208ff1184f45fd756fe7a59403'/>
<id>urn:sha1:1bc1c4391b7909208ff1184f45fd756fe7a59403</id>
<content type='text'>
commit 42bec214d8bd432be6d32a1acb0a9079ecd4d142 upstream.

The df for a SMB2 share triggers a GetInfo call for
FS_FULL_SIZE_INFORMATION. The values returned are used to populate
struct statfs.

The problem is that none of the information returned by the call
contains the total blocks available on the filesystem. Instead we use
the blocks available to the user ie. quota limitation when filling out
statfs.f_blocks. The information returned does contain Actual free units
on the filesystem and is used to populate statfs.f_bfree. For users with
quota enabled, it can lead to situations where the total free space
reported is more than the total blocks on the system ending up with df
reports like the following

 # df -h /mnt/a
Filesystem         Size  Used Avail Use% Mounted on
//192.168.22.10/a  2.5G -2.3G  2.5G    - /mnt/a

To fix this problem, we instead populate both statfs.f_bfree with the
same value as statfs.f_bavail ie. CallerAvailableAllocationUnits. This
is similar to what is done already in the code for cifs and df now
reports the quota information for the user used to mount the share.

 # df --si /mnt/a
Filesystem         Size  Used Avail Use% Mounted on
//192.168.22.10/a  2.7G  101M  2.6G   4% /mnt/a

Signed-off-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Signed-off-by: Pierguido Lambri &lt;plambri@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: Reconnect expired SMB sessions</title>
<updated>2017-07-27T22:10:15Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2017-07-08T21:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac7e0a9e3c7f2aa7f59e6d12869829960f6cbefc'/>
<id>urn:sha1:ac7e0a9e3c7f2aa7f59e6d12869829960f6cbefc</id>
<content type='text'>
commit 511c54a2f69195b28afb9dd119f03787b1625bb4 upstream.

According to the MS-SMB2 spec (3.2.5.1.6) once the client receives
STATUS_NETWORK_SESSION_EXPIRED error code from a server it should
reconnect the current SMB session. Currently the client doesn't do
that. This can result in subsequent client requests failing by
the server. The patch adds an additional logic to the demultiplex
thread to identify expired sessions and reconnect them.

Signed-off-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: Fix some return values in case of error in 'crypt_message'</title>
<updated>2017-06-21T05:09:28Z</updated>
<author>
<name>Christophe Jaillet</name>
</author>
<published>2017-06-11T07:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=517a6e43c4872c89794af5b377fa085e47345952'/>
<id>urn:sha1:517a6e43c4872c89794af5b377fa085e47345952</id>
<content type='text'>
'rc' is known to be 0 at this point. So if 'init_sg' or 'kzalloc' fails, we
should return -ENOMEM instead.

Also remove a useless 'rc' in a debug message as it is meaningless here.

Fixes: 026e93dc0a3ee ("CIFS: Encrypt SMB3 requests before sending")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Reviewed-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: remove redundant return in cifs_creation_time_get</title>
<updated>2017-06-21T00:14:40Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2017-06-06T23:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e125f5284f81bbb765a504494622b45c02faf978'/>
<id>urn:sha1:e125f5284f81bbb765a504494622b45c02faf978</id>
<content type='text'>
There is a redundant return in function cifs_creation_time_get
that appears to be old vestigial code than can be removed. So
remove it.

Detected by CoverityScan, CID#1361924 ("Structurally dead code")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>CIFS: Improve readdir verbosity</title>
<updated>2017-06-21T00:13:47Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2017-06-06T23:58:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dcd87838c06f05ab7650b249ebf0d5b57ae63e1e'/>
<id>urn:sha1:dcd87838c06f05ab7650b249ebf0d5b57ae63e1e</id>
<content type='text'>
Downgrade the loglevel for SMB2 to prevent filling the log
with messages if e.g. readdir was interrupted. Also make SMB2
and SMB1 codepaths do the same logging during readdir.

Signed-off-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>CIFS: check if pages is null rather than bv for a failed allocation</title>
<updated>2017-06-21T00:11:35Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2017-05-17T18:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecf3411a121e7a653e309ff50a820ffa87c537f8'/>
<id>urn:sha1:ecf3411a121e7a653e309ff50a820ffa87c537f8</id>
<content type='text'>
pages is being allocated however a null check on bv is being used
to see if the allocation failed. Fix this by checking if pages is
null.

Detected by CoverityScan, CID#1432974 ("Logically dead code")

Fixes: ccf7f4088af2dd ("CIFS: Add asynchronous context to support kernel AIO")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>CIFS: Set -&gt;should_dirty in cifs_user_readv()</title>
<updated>2017-06-20T22:57:27Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2017-05-05T05:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a7b0d8e8d9962ec3b2ae64dd4e86d68a6fb9220'/>
<id>urn:sha1:8a7b0d8e8d9962ec3b2ae64dd4e86d68a6fb9220</id>
<content type='text'>
The current code causes a static checker warning because ITER_IOVEC is
zero so the condition is never true.

Fixes: 6685c5e2d1ac ("CIFS: Add asynchronous read support through kernel AIO")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
</feed>
