Commit 7ba89d2
committed
io_uring: ensure recv and recvmsg handle MSG_WAITALL correctly
We currently don't attempt to get the full asked for length even if
MSG_WAITALL is set, if we get a partial receive. If we do see a partial
receive, then just note how many bytes we did and return -EAGAIN to
get it retried.
The iov is advanced appropriately for the vector based case, and we
manually bump the buffer and remainder for the non-vector case.
Cc: stable@vger.kernel.org
Reported-by: Constantine Gavrilov <constantine.gavrilov@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 4d55f23 commit 7ba89d2
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
| |||
5417 | 5418 | | |
5418 | 5419 | | |
5419 | 5420 | | |
| 5421 | + | |
5420 | 5422 | | |
5421 | 5423 | | |
5422 | 5424 | | |
| 5425 | + | |
| 5426 | + | |
| 5427 | + | |
| 5428 | + | |
| 5429 | + | |
| 5430 | + | |
| 5431 | + | |
5423 | 5432 | | |
5424 | 5433 | | |
5425 | 5434 | | |
| 5435 | + | |
5426 | 5436 | | |
5427 | 5437 | | |
5428 | 5438 | | |
| |||
5465 | 5475 | | |
5466 | 5476 | | |
5467 | 5477 | | |
| 5478 | + | |
| 5479 | + | |
| 5480 | + | |
| 5481 | + | |
5468 | 5482 | | |
5469 | 5483 | | |
5470 | 5484 | | |
| |||
5474 | 5488 | | |
5475 | 5489 | | |
5476 | 5490 | | |
| 5491 | + | |
| 5492 | + | |
| 5493 | + | |
| 5494 | + | |
5477 | 5495 | | |
5478 | 5496 | | |
5479 | 5497 | | |
| |||
5524 | 5542 | | |
5525 | 5543 | | |
5526 | 5544 | | |
| 5545 | + | |
| 5546 | + | |
| 5547 | + | |
| 5548 | + | |
| 5549 | + | |
| 5550 | + | |
5527 | 5551 | | |
5528 | 5552 | | |
5529 | 5553 | | |
5530 | 5554 | | |
5531 | 5555 | | |
5532 | 5556 | | |
| 5557 | + | |
| 5558 | + | |
| 5559 | + | |
| 5560 | + | |
5533 | 5561 | | |
5534 | 5562 | | |
5535 | 5563 | | |
| |||
0 commit comments