<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-24T07:58:06Z</updated>
<entry>
<title>cifs: return correct error in -&gt;calc_signature()</title>
<updated>2022-10-24T07:58:06Z</updated>
<author>
<name>Enzo Matsumiya</name>
</author>
<published>2022-09-16T23:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c28acd0039fa5ae04f01e22acae8d6f5ce84750d'/>
<id>urn:sha1:c28acd0039fa5ae04f01e22acae8d6f5ce84750d</id>
<content type='text'>
[ Upstream commit 09a1f9a168ae1f69f701689429871793174417d2 ]

If an error happens while getting the key or session in the
-&gt;calc_signature implementations, 0 (success) is returned. Fix it by
returning a proper error code.

Since it seems to be highly unlikely to happen wrap the rc check in
unlikely() too.

Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Fixes: 32811d242ff6 ("cifs: Start using per session key for smb2/3 for signature generation")
Signed-off-by: Enzo Matsumiya &lt;ematsumiya@suse.de&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>smb3: must initialize two ACL struct fields to zero</title>
<updated>2022-10-24T07:57:01Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2022-10-14T23:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d296b4fd4c159f21985537bd0f9cfcb21112e992'/>
<id>urn:sha1:d296b4fd4c159f21985537bd0f9cfcb21112e992</id>
<content type='text'>
commit f09bd695af3b8ab46fc24e5d6954a24104c38387 upstream.

Coverity spotted that we were not initalizing Stbz1 and Stbz2 to
zero in create_sd_buf.

Addresses-Coverity: 1513848 ("Uninitialized scalar variable")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&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>smb3: do not log confusing message when server returns no network interfaces</title>
<updated>2022-10-24T07:56:51Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2022-10-01T16:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2c9555cce37984c94a65b6386c992ed40632a68'/>
<id>urn:sha1:d2c9555cce37984c94a65b6386c992ed40632a68</id>
<content type='text'>
commit 4659f01e3cd94f64d9bd06764ace2ef8fe1b6227 upstream.

Some servers can return an empty network interface list so, unless
multichannel is requested, no need to log an error for this, and
when multichannel is requested on mount but no interfaces, log
something less confusing.  For this case change
   parse_server_interfaces: malformed interface info
to
   empty network interface list returned by server localhost

Also do not relog this error every ten minutes (only log on mount, once)

Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&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 the error length of VALIDATE_NEGOTIATE_INFO message</title>
<updated>2022-10-24T07:56:41Z</updated>
<author>
<name>Zhang Xiaoxu</name>
</author>
<published>2022-09-26T03:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=943eb0ede74ecd609fdfd3f0b83e0d237613e526'/>
<id>urn:sha1:943eb0ede74ecd609fdfd3f0b83e0d237613e526</id>
<content type='text'>
commit e98ecc6e94f4e6d21c06660b0f336df02836694f upstream.

Commit d5c7076b772a ("smb3: add smb3.1.1 to default dialect list")
extend the dialects from 3 to 4, but forget to decrease the extended
length when specific the dialect, then the message length is larger
than expected.

This maybe leak some info through network because not initialize the
message body.

After apply this patch, the VALIDATE_NEGOTIATE_INFO message length is
reduced from 28 bytes to 26 bytes.

Fixes: d5c7076b772a ("smb3: add smb3.1.1 to default dialect list")
Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: Tom Talpey &lt;tom@talpey.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: destage dirty pages before re-reading them for cache=none</title>
<updated>2022-10-24T07:56:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2022-09-20T04:32:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56fc362eb3db6a330e1a26f88f3d6648da42de27'/>
<id>urn:sha1:56fc362eb3db6a330e1a26f88f3d6648da42de27</id>
<content type='text'>
commit bb44c31cdcac107344dd2fcc3bd0504a53575c51 upstream.

This is the opposite case of kernel bugzilla 216301.
If we mmap a file using cache=none and then proceed to update the mmapped
area these updates are not reflected in a later pread() of that part of the
file.
To fix this we must first destage any dirty pages in the range before
we allow the pread() to proceed.

Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.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>smb3: use filemap_write_and_wait_range instead of filemap_write_and_wait</title>
<updated>2022-09-28T09:32:00Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2022-08-29T16:53:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c64dd4dbf9026b2c2e19a01da126b0df17c5c1b'/>
<id>urn:sha1:7c64dd4dbf9026b2c2e19a01da126b0df17c5c1b</id>
<content type='text'>
[ Upstream commit 3e3761f1ec7df67d88cfca5e2ea98538f529e645 ]

When doing insert range and collapse range we should be
writing out the cached pages for the ranges affected but not
the whole file.

Fixes: c3a72bb21320 ("smb3: Move the flush out of smb2_copychunk_range() into its callers")
Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.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>smb3: fix temporary data corruption in insert range</title>
<updated>2022-09-28T09:31:59Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2022-08-23T13:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0cdde8460c304283d4ebe3f767a70215d1ab9d4e'/>
<id>urn:sha1:0cdde8460c304283d4ebe3f767a70215d1ab9d4e</id>
<content type='text'>
[ Upstream commit 9c8b7a293f50253e694f19161c045817a938e551 ]

insert range doesn't discard the affected cached region
so can risk temporarily corrupting file data.

Also includes some minor cleanup (avoiding rereading
inode size repeatedly unnecessarily) to make it clearer.

Cc: stable@vger.kernel.org
Fixes: 7fe6fe95b936 ("cifs: add FALLOC_FL_INSERT_RANGE support")
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Ronnie Sahlberg &lt;lsahlber@redhat.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>smb3: fix temporary data corruption in collapse range</title>
<updated>2022-09-28T09:31:59Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2022-08-23T13:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49523a4732204bdacbf3941a016503ddb4ddb3b9'/>
<id>urn:sha1:49523a4732204bdacbf3941a016503ddb4ddb3b9</id>
<content type='text'>
[ Upstream commit fa30a81f255a56cccd89552cd6ce7ea6e8d8acc4 ]

collapse range doesn't discard the affected cached region
so can risk temporarily corrupting the file data. This
fixes xfstest generic/031

I also decided to merge a minor cleanup to this into the same patch
(avoiding rereading inode size repeatedly unnecessarily) to make it
clearer.

Cc: stable@vger.kernel.org
Fixes: 5476b5dd82c8b ("cifs: add support for FALLOC_FL_COLLAPSE_RANGE")
Reported-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Ronnie Sahlberg &lt;lsahlber@redhat.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>smb3: Move the flush out of smb2_copychunk_range() into its callers</title>
<updated>2022-09-28T09:31:59Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2022-08-23T13:07:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc914c37e55f5ba37908e570263c7c2bb87e1215'/>
<id>urn:sha1:cc914c37e55f5ba37908e570263c7c2bb87e1215</id>
<content type='text'>
[ Upstream commit c3a72bb213209adfe981a4a92ea5746a778323e4 ]

Move the flush out of smb2_copychunk_range() into its callers.  This will
allow the pagecache to be invalidated between the flush and the operation
in smb3_collapse_range() and smb3_insert_range().

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Stable-dep-of: fa30a81f255a ("smb3: fix temporary data corruption in collapse range")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: always initialize struct msghdr smb_msg completely</title>
<updated>2022-09-23T12:14:04Z</updated>
<author>
<name>Stefan Metzmacher</name>
</author>
<published>2022-09-14T03:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2c7f67fd12d82bb89a210f3442e392b5d781fda'/>
<id>urn:sha1:c2c7f67fd12d82bb89a210f3442e392b5d781fda</id>
<content type='text'>
commit bedc8f76b3539ac4f952114b316bcc2251e808ce upstream.

So far we were just lucky because the uninitialized members
of struct msghdr are not used by default on a SOCK_STREAM tcp
socket.

But as new things like msg_ubuf and sg_from_iter where added
recently, we should play on the safe side and avoid potention
problems in future.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.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>
</feed>
