From: Stefano Garzarella <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Alexander Viro <[email protected]>,
[email protected],
Stefano Garzarella <[email protected]>,
Kees Cook <[email protected]>,
[email protected], [email protected]
Subject: [PATCH for-next] io_uring: fix ctx refcounting in io_uring_enter()
Date: Wed, 9 Sep 2020 17:19:00 +0200 [thread overview]
Message-ID: <[email protected]> (raw)
If the ring is disabled we don't decrease the 'ctx' refcount since
we wrongly jump to 'out_fput' label.
Instead let's jump to 'out' label where we decrease the 'ctx' refcount.
Fixes: 7ec3d1dd9378 ("io_uring: allow disabling rings during the creation")
Signed-off-by: Stefano Garzarella <[email protected]>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index bd1ac8581d38..8fc44967fd52 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8645,7 +8645,7 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
ret = -EBADFD;
if (ctx->flags & IORING_SETUP_R_DISABLED)
- goto out_fput;
+ goto out;
/*
* For SQ polling, the thread will do all submissions and completions.
--
2.26.2
next reply other threads:[~2020-09-09 15:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 15:19 Stefano Garzarella [this message]
2020-09-09 18:30 ` [PATCH for-next] io_uring: fix ctx refcounting in io_uring_enter() Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox