Skip to content

Commit 172a9d9

Browse files
committed
Merge tag '6.15-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fixes from Steve French: - Fix memory leak in mkdir error path - Fix max rsize miscalculation after channel reconnect * tag '6.15-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: client: fix zero rsize error messages smb: client: fix memory leak during error handling for POSIX mkdir
2 parents 12b6c62 + 3965c23 commit 172a9d9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

fs/smb/client/file.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ static int cifs_prepare_read(struct netfs_io_subrequest *subreq)
160160
server = cifs_pick_channel(tlink_tcon(req->cfile->tlink)->ses);
161161
rdata->server = server;
162162

163-
cifs_negotiate_rsize(server, cifs_sb->ctx,
164-
tlink_tcon(req->cfile->tlink));
163+
if (cifs_sb->ctx->rsize == 0) {
164+
cifs_negotiate_rsize(server, cifs_sb->ctx,
165+
tlink_tcon(req->cfile->tlink));
166+
}
165167

166168
rc = server->ops->wait_mtu_credits(server, cifs_sb->ctx->rsize,
167169
&size, &rdata->credits);

fs/smb/client/smb2pdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
29682968
/* Eventually save off posix specific response info and timestamps */
29692969

29702970
err_free_rsp_buf:
2971-
free_rsp_buf(resp_buftype, rsp);
2971+
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
29722972
kfree(pc_buf);
29732973
err_free_req:
29742974
cifs_small_buf_release(req);

0 commit comments

Comments
 (0)