mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
RDMA v6.17 merge window second pull request
Single fix to correct the iov_iter construction in soft iwarp. This avoids blktest crashes with recent changes to the allocators. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRRRCHOFoQz/8F5bUaFwuHvBreFYQUCaJOa7AAKCRCFwuHvBreF YZtlAP9fv5b3eH7ND8/iPuTtnnS4sH08BBBXtbDeQUWHflxDmgD/aax3/v4VS96Q xPWusMe7w5M0sDt/2VFLmHYpbowieww= =Xe0p -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
2095cf558f
@ -340,18 +340,17 @@ static int siw_tcp_sendpages(struct socket *s, struct page **page, int offset,
|
|||||||
if (!sendpage_ok(page[i]))
|
if (!sendpage_ok(page[i]))
|
||||||
msg.msg_flags &= ~MSG_SPLICE_PAGES;
|
msg.msg_flags &= ~MSG_SPLICE_PAGES;
|
||||||
bvec_set_page(&bvec, page[i], bytes, offset);
|
bvec_set_page(&bvec, page[i], bytes, offset);
|
||||||
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, size);
|
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, bytes);
|
||||||
|
|
||||||
try_page_again:
|
try_page_again:
|
||||||
lock_sock(sk);
|
lock_sock(sk);
|
||||||
rv = tcp_sendmsg_locked(sk, &msg, size);
|
rv = tcp_sendmsg_locked(sk, &msg, bytes);
|
||||||
release_sock(sk);
|
release_sock(sk);
|
||||||
|
|
||||||
if (rv > 0) {
|
if (rv > 0) {
|
||||||
size -= rv;
|
size -= rv;
|
||||||
sent += rv;
|
sent += rv;
|
||||||
if (rv != bytes) {
|
if (rv != bytes) {
|
||||||
offset += rv;
|
|
||||||
bytes -= rv;
|
bytes -= rv;
|
||||||
goto try_page_again;
|
goto try_page_again;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user