mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
io_uring-6.11-20240809
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAma2ELcQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgppnVEADUHnoXHEGg1+7MrUEJql0Ne1tsIlowg6j2 NAw4dUXZNtAuH+eNQXCiYmagzQq19wwsAi7k0CiAqK5ra9TWfHcmQ4diFf4VBjBE dzhtmioT5uH3iuX8U/oQXgx5hrER5pm6llJZIFQxRPD928becLrL9PlfDq2BNqUw VunkTG2I767ISgpY8iHcKpK2uZuZh/wonoNLD7kWQ3I6T1bGxx+Yev8SvsycbB3E OpB3cBOqm04j/rfCJCWpiPQLNdqt0fm1Djf28ONDjaddHlsD2VBsfEVev6Cbztrc ICQ1P1hibDZy7MG4Eb/nFV8SUeEK45nBsR+5kbFMKIWjySBP+2bS7kiNOzvaeN2k AdSVlhA5Y03kg7IizkO5kloGi2DHq+vbl7ADKz/Rojt/aVpD6mA47N1xv+nr2MP7 ldod8K0RKp5oJDeRQqEqmF5qMrXVHq+Y6NbsmIKBaW0zroq1zzfs8Ams4kPef64O 3n2j2GmncPADmjmRSYWSuMRSrL/15q8XfKvr/QJhhD0Hb1v9XCY7gwznQ8IMfqIN JctLurDt2PMeReI0DMK01q21XIsSoJR9TJHA8rRR6K+HzsTae3C31tROOS+PsaLx uF9IISV/mcHlV4wor8OV9br3oEkwAsxa8Y5JwP2sEiTAu8Jh4zeUT+3AJdEVzycR 6yw76jhFtw== =iXzz -----END PGP SIGNATURE----- Merge tag 'io_uring-6.11-20240809' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Nothing major in here, just two fixes for ensuring that bundle recv/send requests always get marked for cleanups, and a single fix to ensure that sends with provided buffers only pick a single buffer unless the bundle option has been enabled" * tag 'io_uring-6.11-20240809' of git://git.kernel.dk/linux: io_uring/net: don't pick multiple buffers for non-bundle send io_uring/net: ensure expanded bundle send gets marked for cleanup io_uring/net: ensure expanded bundle recv gets marked for cleanup
This commit is contained in:
commit
8828729c44
1 changed files with 5 additions and 2 deletions
|
@ -601,17 +601,18 @@ int io_send(struct io_kiocb *req, unsigned int issue_flags)
|
|||
.iovs = &kmsg->fast_iov,
|
||||
.max_len = INT_MAX,
|
||||
.nr_iovs = 1,
|
||||
.mode = KBUF_MODE_EXPAND,
|
||||
};
|
||||
|
||||
if (kmsg->free_iov) {
|
||||
arg.nr_iovs = kmsg->free_iov_nr;
|
||||
arg.iovs = kmsg->free_iov;
|
||||
arg.mode |= KBUF_MODE_FREE;
|
||||
arg.mode = KBUF_MODE_FREE;
|
||||
}
|
||||
|
||||
if (!(sr->flags & IORING_RECVSEND_BUNDLE))
|
||||
arg.nr_iovs = 1;
|
||||
else
|
||||
arg.mode |= KBUF_MODE_EXPAND;
|
||||
|
||||
ret = io_buffers_select(req, &arg, issue_flags);
|
||||
if (unlikely(ret < 0))
|
||||
|
@ -623,6 +624,7 @@ int io_send(struct io_kiocb *req, unsigned int issue_flags)
|
|||
if (arg.iovs != &kmsg->fast_iov && arg.iovs != kmsg->free_iov) {
|
||||
kmsg->free_iov_nr = ret;
|
||||
kmsg->free_iov = arg.iovs;
|
||||
req->flags |= REQ_F_NEED_CLEANUP;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1094,6 +1096,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg
|
|||
if (arg.iovs != &kmsg->fast_iov && arg.iovs != kmsg->free_iov) {
|
||||
kmsg->free_iov_nr = ret;
|
||||
kmsg->free_iov = arg.iovs;
|
||||
req->flags |= REQ_F_NEED_CLEANUP;
|
||||
}
|
||||
} else {
|
||||
void __user *buf;
|
||||
|
|
Loading…
Reference in a new issue