If the query chain forms a cycle, the interface will loop indefinitely.
Make sure it handles fatal signals, so the user can kill the process and
hence break out of the infinite loop.
Fixes: c265ae75f900 ("io_uring: introduce io_uring querying")
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
if (ret)
return ret;
uhdr = u64_to_user_ptr(next_hdr);
+
+ if (fatal_signal_pending(current))
+ return -EINTR;
+ cond_resched();
}
return 0;
}