On 7/24/19 8:11 AM, Daniel Kozak wrote:
> Hi,
>
> I am playing with io_uring interface and for some reason it is causing
> freezing my pc. Here is some example code which cause this:
>
> https://bitbucket.org/kozzi11/uring_hang/src/master/main.c
>
> When runing this and test it with wrk (https://github.com/wg/wrk) :
> wrk --latency -d 15 -c 2048 --timeout 8 -t 8 http://localhost:8080/
>
> it completly hang pc.
>
> Thank you for any hint if there is something wrong with way how I am
> using io_uring interface or it is a bug in io_uring itself.
>
> Daniel Kozak
>
Does this help?
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7343d655f247..fb94cfe0ff3a 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1599,7 +1599,7 @@ static int io_poll_wake(struct wait_queue_entry *wait,
unsigned mode, int sync,
list_del_init(&poll->wait.entry);
if (mask && spin_trylock_irqsave(&ctx->completion_lock, flags)) {
- list_del(&req->list);
+ list_del_init(&req->list);
io_poll_complete(ctx, req, mask);
spin_unlock_irqrestore(&ctx->completion_lock, flags);
--
Jens Axboe