* 5.10/15 file registration fixup
@ 2024-04-02 14:51 Jens Axboe
2024-04-05 9:17 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2024-04-02 14:51 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman, Sasha Levin
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
Hi,
A previous stable backport neglected to handle that we now don't clear
'ret' since the SCM registration went away. I checked the other stable
kernels and it's only affecting 5.10/5.15.
Can you apply this fixup patch for 5.10-stable and 5.15-stable? I
provided one for each even though they are identical, but the fixup
sha is obviously different for them.
Thanks!
--
Jens Axboe
[-- Attachment #2: 5.10-0001-io_uring-ensure-0-is-returned-on-file-registration-s.patch --]
[-- Type: text/x-patch, Size: 1028 bytes --]
From a8c22921a08a8d50b10fc836cff4348d5dde17e2 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@kernel.dk>
Date: Tue, 2 Apr 2024 08:28:04 -0600
Subject: [PATCH] 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>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.43.0
[-- Attachment #3: 5.15-0001-io_uring-ensure-0-is-returned-on-file-registration-s.patch --]
[-- Type: text/x-patch, Size: 1028 bytes --]
From 51ebdc3b0996cc43502b25e95637c66bb083e252 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@kernel.dk>
Date: Tue, 2 Apr 2024 08:28:04 -0600
Subject: [PATCH] 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: d909d381c315 ("io_uring: drop any code related to SCM_RIGHTS")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index a51429c0342e..ff6c36aec27c 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -8422,7 +8422,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);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: 5.10/15 file registration fixup
2024-04-02 14:51 5.10/15 file registration fixup Jens Axboe
@ 2024-04-05 9:17 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2024-04-05 9:17 UTC (permalink / raw)
To: Jens Axboe; +Cc: stable, Sasha Levin
On Tue, Apr 02, 2024 at 08:51:29AM -0600, Jens Axboe wrote:
> Hi,
>
> A previous stable backport neglected to handle that we now don't clear
> 'ret' since the SCM registration went away. I checked the other stable
> kernels and it's only affecting 5.10/5.15.
>
> Can you apply this fixup patch for 5.10-stable and 5.15-stable? I
> provided one for each even though they are identical, but the fixup
> sha is obviously different for them.
Both now queued up, thanks!
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-05 9:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-02 14:51 5.10/15 file registration fixup Jens Axboe
2024-04-05 9:17 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).