summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-04-02 08:28:04 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-13 12:59:22 +0200
commit1eff09acc808d3a4225acc754ee8df435407e6a6 (patch)
tree0754b6b7cf258979824600e1e61820abf94c3e4d /io_uring
parenta563fc18583ca4f42e2fdd0c70c7c618288e7ede (diff)
downloadlinux-1eff09acc808d3a4225acc754ee8df435407e6a6.tar.gz
linux-1eff09acc808d3a4225acc754ee8df435407e6a6.tar.bz2
linux-1eff09acc808d3a4225acc754ee8df435407e6a6.zip
io_uring: ensure '0' is returned on file registration success
A previous backport mistakenly removed code that cleared 'ret' to zero, as the SCM logging was performed. Fix up the return value so we don't return an errant error on fixed file registration. Fixes: a6771f343af9 ("io_uring: drop any code related to SCM_RIGHTS") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index fc60396c9039..93f9ecedc59f 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -8247,7 +8247,7 @@ static int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
}
io_rsrc_node_switch(ctx, NULL);
- return ret;
+ return 0;
out_fput:
for (i = 0; i < ctx->nr_user_files; i++) {
file = io_file_from_index(ctx, i);