Skip to content

Commit 023fc15

Browse files
dhowellssmfrench
authored andcommitted
cifs: Reapply lost fix from commit 30b2b21
Reapply the fix from: 30b2b21 ("cifs: do not include page data when checking signature") that got lost in the iteratorisation of the cifs driver. Fixes: d08089f ("cifs: Change the I/O paths to use an iterator rather than a page list") Acked-by: Paulo Alcantara (SUSE) <[email protected]> Reported-by: Paulo Alcantara <[email protected]> Signed-off-by: David Howells <[email protected]> cc: Paulo Alcantara <[email protected]> cc: Shyam Prasad N <[email protected]> cc: Bharath S M <[email protected]> cc: Enzo Matsumiya <[email protected]> cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent ac13692 commit 023fc15

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

fs/cifs/smb2pdu.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4180,10 +4180,12 @@ smb2_readv_callback(struct mid_q_entry *mid)
41804180
struct smb2_hdr *shdr =
41814181
(struct smb2_hdr *)rdata->iov[0].iov_base;
41824182
struct cifs_credits credits = { .value = 0, .instance = 0 };
4183-
struct smb_rqst rqst = { .rq_iov = &rdata->iov[1],
4184-
.rq_nvec = 1,
4185-
.rq_iter = rdata->iter,
4186-
.rq_iter_size = iov_iter_count(&rdata->iter), };
4183+
struct smb_rqst rqst = { .rq_iov = &rdata->iov[1], .rq_nvec = 1 };
4184+
4185+
if (rdata->got_bytes) {
4186+
rqst.rq_iter = rdata->iter;
4187+
rqst.rq_iter_size = iov_iter_count(&rdata->iter);
4188+
};
41874189

41884190
WARN_ONCE(rdata->server != mid->server,
41894191
"rdata server %p != mid server %p",

0 commit comments

Comments
 (0)