Commit dddca22
io_uring: dont overlap internal and user req flags
CQE flags take one byte that we store in req->flags together with other
REQ_F_* internal flags. CQE flags are copied directly into req and then
verified that requires some handling on failures, e.g. to make sure that
that copy doesn't set some of the internal flags.
Move all internal flags to take bits after the first byte, so we don't
need extra handling and make it safer overall.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b8b5b02d1ab9d786fcc7db4a3fe86db6b70b8987.1619536280.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 2840f71 commit dddca22
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
| 705 | + | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
6503 | 6504 | | |
6504 | 6505 | | |
6505 | 6506 | | |
6506 | | - | |
6507 | | - | |
| 6507 | + | |
6508 | 6508 | | |
6509 | | - | |
6510 | | - | |
6511 | 6509 | | |
6512 | 6510 | | |
6513 | | - | |
6514 | 6511 | | |
6515 | 6512 | | |
6516 | 6513 | | |
| |||
0 commit comments