projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
491381c
)
io_uring: fix logic error in io_timeout
author
yangerkun
<yangerkun@huawei.com>
Thu, 17 Oct 2019 04:12:35 +0000
(12:12 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 17 Oct 2019 21:49:15 +0000
(15:49 -0600)
If ctx->cached_sq_head < nxt_sq_head, we should add UINT_MAX to tmp, not
tmp_nxt.
Fixes:
5da0fb1ab34c
("io_uring: consider the overflow of sequence for timeout req")
Signed-off-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index b7d4085d6ffd0979deda5043ba64a41e29cbd3c9..1d03afd743685dedf938dc938dee7ad10f2a0134 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-1949,7
+1949,7
@@
static int io_timeout(struct io_kiocb *req, const struct io_uring_sqe *sqe)
* once there is some timeout req still be valid.
*/
if (ctx->cached_sq_head < nxt_sq_head)
- tmp
_nxt
+= UINT_MAX;
+ tmp += UINT_MAX;
if (tmp >= tmp_nxt)
break;