public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: Fix getting file for timeout
@ 2019-11-13 21:11 Pavel Begunkov
  2019-11-13 21:33 ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Begunkov @ 2019-11-13 21:11 UTC (permalink / raw)
  To: Jens Axboe, io-uring

For timeout requests and bunch of others io_uring tries to grab a file
with specified fd, which is usually stdin/fd=0.
Update io_op_needs_file()

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 6aea62f3bfff..0730c54b2153 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2599,6 +2599,10 @@ static bool io_op_needs_file(const struct io_uring_sqe *sqe)
 	switch (op) {
 	case IORING_OP_NOP:
 	case IORING_OP_POLL_REMOVE:
+	case IORING_OP_TIMEOUT:
+	case IORING_OP_TIMEOUT_REMOVE:
+	case IORING_OP_ASYNC_CANCEL:
+	case IORING_OP_LINK_TIMEOUT:
 		return false;
 	default:
 		return true;
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-13 22:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13 21:11 [PATCH] io_uring: Fix getting file for timeout Pavel Begunkov
2019-11-13 21:33 ` Jens Axboe
2019-11-13 21:37   ` Jens Axboe
2019-11-13 21:47     ` Pavel Begunkov
2019-11-13 21:54       ` Jens Axboe
2019-11-13 22:05         ` Pavel Begunkov
2019-11-13 22:27           ` Jens Axboe
2019-11-13 21:59       ` [PATCH for-linus] " Pavel Begunkov
2019-11-13 21:59         ` [PATCH for-5.5] io_uring: update io_op_needs_file Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox