Skip to content

Commit 2095cf5

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fix from Jason Gunthorpe: "Single fix to correct the iov_iter construction in soft iwarp. This avoids blktest crashes with recent changes to the allocators" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/siw: Fix the sendmsg byte count in siw_tcp_sendpages
2 parents e8214ed + c186462 commit 2095cf5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/infiniband/sw/siw/siw_qp_tx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,18 +340,17 @@ static int siw_tcp_sendpages(struct socket *s, struct page **page, int offset,
340340
if (!sendpage_ok(page[i]))
341341
msg.msg_flags &= ~MSG_SPLICE_PAGES;
342342
bvec_set_page(&bvec, page[i], bytes, offset);
343-
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, size);
343+
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, bytes);
344344

345345
try_page_again:
346346
lock_sock(sk);
347-
rv = tcp_sendmsg_locked(sk, &msg, size);
347+
rv = tcp_sendmsg_locked(sk, &msg, bytes);
348348
release_sock(sk);
349349

350350
if (rv > 0) {
351351
size -= rv;
352352
sent += rv;
353353
if (rv != bytes) {
354-
offset += rv;
355354
bytes -= rv;
356355
goto try_page_again;
357356
}

0 commit comments

Comments
 (0)