mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
Two small cifs/smb3 client fixes
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmOC6QYACgkQiiy9cAdy T1EaUgv/eEFpIzkRXuJHuPBlxWM7Gz6DiFkWd83ADcB15+4ADzPVdc1HqbnSw0/0 yPsxfhn95Ydo+zORPJ5puGUpveqNIen8xPeGaORGCCEMCYw5A58K2I8bkSYcMJUd 63hiLmw9ZpaXxkLXX/Y04hSYBwPIhwLSrT1kfPy7jru78DjvmOya1WHaBzQZQ0ej 374cDrG9yhWl+udFWJi1HxQt+fnJecaMNJy51BDeOeN3mM4j/kqHgYw2q5GfcbhL nyr56UTxHvBpyciguKzqNIUVcFiANr7Il5Yz++NSjRcFUnhgoxPZ+eHMU1X6fpFB fgLhcDsbBeWhPZnOAsb4X3HEhb41f61i5s2pYzwU7bhXYla0UrqEIS9RNjh3dgPx WnRErVPiOwPP6mRl+064KITWcv3riDb8QbwEtqJQQT1TUPXM0b190wq59lHqIpJk rV41bV7s3z839CulF+2Y9fuQVe5SL90kDSxF3gOue4SCzBfbl0Tww5gn3IIHvo+5 cyZZ3wQU =89M+ -----END PGP SIGNATURE----- Merge tag '6.1-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Two small cifs/smb3 client fixes: - an unlock missing in an error path in copychunk_range found by xfstest 476 - a fix for a use after free in a debug code path" * tag '6.1-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix missing unlock in cifs_file_copychunk_range() cifs: Use after free in debug code
This commit is contained in:
commit
30a853c1bd
|
@ -1281,7 +1281,7 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
|
|||
rc = filemap_write_and_wait_range(src_inode->i_mapping, off,
|
||||
off + len - 1);
|
||||
if (rc)
|
||||
goto out;
|
||||
goto unlock;
|
||||
|
||||
/* should we flush first and last page first */
|
||||
truncate_inode_pages(&target_inode->i_data, 0);
|
||||
|
@ -1297,6 +1297,8 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
|
|||
* that target is updated on the server
|
||||
*/
|
||||
CIFS_I(target_inode)->time = 0;
|
||||
|
||||
unlock:
|
||||
/* although unlocking in the reverse order from locking is not
|
||||
* strictly necessary here it is a little cleaner to be consistent
|
||||
*/
|
||||
|
|
|
@ -302,14 +302,14 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
|
|||
|
||||
/* now drop the ref to the current iface */
|
||||
if (old_iface && iface) {
|
||||
kref_put(&old_iface->refcount, release_iface);
|
||||
cifs_dbg(FYI, "replacing iface: %pIS with %pIS\n",
|
||||
&old_iface->sockaddr,
|
||||
&iface->sockaddr);
|
||||
} else if (old_iface) {
|
||||
kref_put(&old_iface->refcount, release_iface);
|
||||
} else if (old_iface) {
|
||||
cifs_dbg(FYI, "releasing ref to iface: %pIS\n",
|
||||
&old_iface->sockaddr);
|
||||
kref_put(&old_iface->refcount, release_iface);
|
||||
} else {
|
||||
WARN_ON(!iface);
|
||||
cifs_dbg(FYI, "adding new iface: %pIS\n", &iface->sockaddr);
|
||||
|
|
Loading…
Reference in a new issue