mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-10 19:43:29 +00:00
Small SMB3 fixes for stable and 4.15rc
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQGcBAABAgAGBQJaMszhAAoJEIosvXAHck9R+gYMAJM6QM9sjiCf8xPh1YhPkGr4 /yLqw6dyaicsPBo2YN6aY3tRNuAkTTbcVW6Sjaepk5WkqK3t//PYC0MzmS9cfDg+ DdgtHwW5CoyB7cdzx0QzgAfoH3A7IRJoO9ezjiM/mkPURZlhJJTgFOhggkCGPzhU R7h39e7SNmg4kB2x/fx4HBWxdHrPj0AysDaxFZ83FiVtZojZ7X9tIRb5HT0PFCB5 buoAjvtOuXueKN91Z/seSkSj0NqaANXYPXsBudMy7TlfDb/tko7LOy7TcmOn1tVy av51+oSTcWSgSLPnJ2LRNMfeguw39YJzcMhAdZh/4/Hik8c2MrBSTaKveJl9N1cf CDqRdKaoycjjhiTPgmreQUaL35rDhJ3LoYOqX2IMsGFjVjbI1S/8oIPJpL/JxZYd t7jxDPGNWjA6AppKo5C2kysjI0VPCvtiwxrm0aCBx6iVM8Hf/nxk9I0Dq7LLL179 7vdYPoS4H4aip5XvDPV99Xus72qfErrnVJcYmOziqg== =QS2E -----END PGP SIGNATURE----- Merge tag '4.15-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Small SMB3 fixes for stable and 4.15rc" * tag '4.15-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6: CIFS: don't log STATUS_NOT_FOUND errors for DFS cifs: fix NULL deref in SMB2_read
This commit is contained in:
commit
d455df0bcc
@ -1406,7 +1406,8 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses,
|
||||
} while (rc == -EAGAIN);
|
||||
|
||||
if (rc) {
|
||||
cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
|
||||
if (rc != -ENOENT)
|
||||
cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -2678,27 +2678,27 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
|
||||
cifs_small_buf_release(req);
|
||||
|
||||
rsp = (struct smb2_read_rsp *)rsp_iov.iov_base;
|
||||
shdr = get_sync_hdr(rsp);
|
||||
|
||||
if (shdr->Status == STATUS_END_OF_FILE) {
|
||||
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE);
|
||||
cifs_dbg(VFS, "Send error in read = %d\n", rc);
|
||||
} else {
|
||||
*nbytes = le32_to_cpu(rsp->DataLength);
|
||||
if ((*nbytes > CIFS_MAX_MSGSIZE) ||
|
||||
(*nbytes > io_parms->length)) {
|
||||
cifs_dbg(FYI, "bad length %d for count %d\n",
|
||||
*nbytes, io_parms->length);
|
||||
rc = -EIO;
|
||||
*nbytes = 0;
|
||||
if (rc != -ENODATA) {
|
||||
cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE);
|
||||
cifs_dbg(VFS, "Send error in read = %d\n", rc);
|
||||
}
|
||||
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
|
||||
return rc == -ENODATA ? 0 : rc;
|
||||
}
|
||||
|
||||
*nbytes = le32_to_cpu(rsp->DataLength);
|
||||
if ((*nbytes > CIFS_MAX_MSGSIZE) ||
|
||||
(*nbytes > io_parms->length)) {
|
||||
cifs_dbg(FYI, "bad length %d for count %d\n",
|
||||
*nbytes, io_parms->length);
|
||||
rc = -EIO;
|
||||
*nbytes = 0;
|
||||
}
|
||||
|
||||
shdr = get_sync_hdr(rsp);
|
||||
|
||||
if (*buf) {
|
||||
memcpy(*buf, (char *)shdr + rsp->DataOffset, *nbytes);
|
||||
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
|
||||
|
Loading…
x
Reference in New Issue
Block a user