commit | 829f6a9a93f99231cf1cda088816cce013ec393c | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@kernel.dk> | Tue May 21 10:45:16 2019 -0600 |
committer | Jens Axboe <axboe@kernel.dk> | Tue May 21 10:47:32 2019 -0600 |
tree | 279ca85d251172bbe64c7189ab4f47a0014dd0e3 | |
parent | ffe3e090cd41d0977ca74fafcb452838f76ceea1 [diff] |
io_uring_submit: fix head/tail wrap issue Use proper unsigned math to figure out how many entries we have. If we have head and tail on either side of UINT_MAX, then we currently don't submit anything as: while (head < tail) { is never true. Reported-by: Weiping Zhang <zhangweiping@didiglobal.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>