* FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
@ 2026-03-01 1:47 Sasha Levin
2026-03-01 13:15 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Sasha Levin @ 2026-03-01 1:47 UTC (permalink / raw)
To: stable, axboe; +Cc: io-uring
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From a6bded921ed35f21b3f6bd8e629bf488499ca442 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@kernel.dk>
Date: Wed, 11 Feb 2026 15:12:03 -0700
Subject: [PATCH] io_uring/filetable: clamp alloc_hint to the configured alloc
range
Explicit fixed file install/remove operations on slots outside the
configured alloc range can corrupt alloc_hint via io_file_bitmap_set()
and io_file_bitmap_clear(), which unconditionally update alloc_hint to
the bit position. This causes subsequent auto-allocations to fall
outside the configured range.
For example, if the alloc range is [10, 20) and a file is removed at
slot 2, alloc_hint gets set to 2. The next auto-alloc then starts
searching from slot 2, potentially returning a slot below the range.
Fix this by clamping alloc_hint to [file_alloc_start, file_alloc_end)
at the top of io_file_bitmap_get() before starting the search.
Cc: stable@vger.kernel.org
Fixes: 6e73dffbb93c ("io_uring: let to set a range for file slot allocation")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/filetable.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/io_uring/filetable.c b/io_uring/filetable.c
index 794ef95df293c..cb1838c9fc377 100644
--- a/io_uring/filetable.c
+++ b/io_uring/filetable.c
@@ -22,6 +22,10 @@ static int io_file_bitmap_get(struct io_ring_ctx *ctx)
if (!table->bitmap)
return -ENFILE;
+ if (table->alloc_hint < ctx->file_alloc_start ||
+ table->alloc_hint >= ctx->file_alloc_end)
+ table->alloc_hint = ctx->file_alloc_start;
+
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret != nr)
--
2.51.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
2026-03-01 1:47 FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree Sasha Levin
@ 2026-03-01 13:15 ` Jens Axboe
2026-03-02 20:38 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2026-03-01 13:15 UTC (permalink / raw)
To: Sasha Levin, stable; +Cc: io-uring
On 2/28/26 6:47 PM, Sasha Levin wrote:
> The patch below does not apply to the 6.1-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
And this one also picks cleanly into 6.1-stable. Not sure what is
going on at your end?
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
2026-03-01 13:15 ` Jens Axboe
@ 2026-03-02 20:38 ` Jens Axboe
2026-03-02 20:41 ` Sasha Levin
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2026-03-02 20:38 UTC (permalink / raw)
To: Sasha Levin, stable; +Cc: io-uring
On 3/1/26 6:15 AM, Jens Axboe wrote:
> On 2/28/26 6:47 PM, Sasha Levin wrote:
>> The patch below does not apply to the 6.1-stable tree.
>> If someone wants it applied there, or to any other stable or longterm
>> tree, then please email the backport, including the original git commit
>> id to <stable@vger.kernel.org>.
>
> And this one also picks cleanly into 6.1-stable. Not sure what is
> going on at your end?
Are these and the other "FAILED" false positives getting applied or
not? I didn't hear anything back on any of them.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
2026-03-02 20:38 ` Jens Axboe
@ 2026-03-02 20:41 ` Sasha Levin
2026-03-02 20:45 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Sasha Levin @ 2026-03-02 20:41 UTC (permalink / raw)
To: Jens Axboe; +Cc: stable, io-uring
On Mon, Mar 02, 2026 at 01:38:37PM -0700, Jens Axboe wrote:
>On 3/1/26 6:15 AM, Jens Axboe wrote:
>> On 2/28/26 6:47 PM, Sasha Levin wrote:
>>> The patch below does not apply to the 6.1-stable tree.
>>> If someone wants it applied there, or to any other stable or longterm
>>> tree, then please email the backport, including the original git commit
>>> id to <stable@vger.kernel.org>.
>>
>> And this one also picks cleanly into 6.1-stable. Not sure what is
>> going on at your end?
>
>Are these and the other "FAILED" false positives getting applied or
>not? I didn't hear anything back on any of them.
Appologies for all of this. There's an explanation of what happened here:
https://lore.kernel.org/all/aaWWE5uQqz_eG69i@laps/
These should be part of the -rc2 I did earlier today.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
2026-03-02 20:41 ` Sasha Levin
@ 2026-03-02 20:45 ` Jens Axboe
2026-03-02 20:58 ` Sasha Levin
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2026-03-02 20:45 UTC (permalink / raw)
To: Sasha Levin; +Cc: stable, io-uring
On 3/2/26 1:41 PM, Sasha Levin wrote:
> On Mon, Mar 02, 2026 at 01:38:37PM -0700, Jens Axboe wrote:
>> On 3/1/26 6:15 AM, Jens Axboe wrote:
>>> On 2/28/26 6:47 PM, Sasha Levin wrote:
>>>> The patch below does not apply to the 6.1-stable tree.
>>>> If someone wants it applied there, or to any other stable or longterm
>>>> tree, then please email the backport, including the original git commit
>>>> id to <stable@vger.kernel.org>.
>>>
>>> And this one also picks cleanly into 6.1-stable. Not sure what is
>>> going on at your end?
>>
>> Are these and the other "FAILED" false positives getting applied or
>> not? I didn't hear anything back on any of them.
>
> Appologies for all of this. There's an explanation of what happened here:
> https://lore.kernel.org/all/aaWWE5uQqz_eG69i@laps/
>
> These should be part of the -rc2 I did earlier today.
Gotcha, yeah it's not easy to know when you don't hear back, either
as a reply or as a new "added to stable" email. For those of us that
do take stable seriously, I 100% need to know if something is landing
or not.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
2026-03-02 20:45 ` Jens Axboe
@ 2026-03-02 20:58 ` Sasha Levin
2026-03-02 21:08 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Sasha Levin @ 2026-03-02 20:58 UTC (permalink / raw)
To: Jens Axboe; +Cc: stable, io-uring
On Mon, Mar 02, 2026 at 01:45:51PM -0700, Jens Axboe wrote:
>On 3/2/26 1:41 PM, Sasha Levin wrote:
>> On Mon, Mar 02, 2026 at 01:38:37PM -0700, Jens Axboe wrote:
>>> On 3/1/26 6:15 AM, Jens Axboe wrote:
>>>> On 2/28/26 6:47 PM, Sasha Levin wrote:
>>>>> The patch below does not apply to the 6.1-stable tree.
>>>>> If someone wants it applied there, or to any other stable or longterm
>>>>> tree, then please email the backport, including the original git commit
>>>>> id to <stable@vger.kernel.org>.
>>>>
>>>> And this one also picks cleanly into 6.1-stable. Not sure what is
>>>> going on at your end?
>>>
>>> Are these and the other "FAILED" false positives getting applied or
>>> not? I didn't hear anything back on any of them.
>>
>> Appologies for all of this. There's an explanation of what happened here:
>> https://lore.kernel.org/all/aaWWE5uQqz_eG69i@laps/
>>
>> These should be part of the -rc2 I did earlier today.
>
>Gotcha, yeah it's not easy to know when you don't hear back, either
>as a reply or as a new "added to stable" email. For those of us that
>do take stable seriously, I 100% need to know if something is landing
>or not.
You're right (and thanks for all the backports!). I had a plan to review all of
these again after the release, but I should have sent something out first.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree
2026-03-02 20:58 ` Sasha Levin
@ 2026-03-02 21:08 ` Jens Axboe
0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2026-03-02 21:08 UTC (permalink / raw)
To: Sasha Levin; +Cc: stable, io-uring
On 3/2/26 1:58 PM, Sasha Levin wrote:
> On Mon, Mar 02, 2026 at 01:45:51PM -0700, Jens Axboe wrote:
>> On 3/2/26 1:41 PM, Sasha Levin wrote:
>>> On Mon, Mar 02, 2026 at 01:38:37PM -0700, Jens Axboe wrote:
>>>> On 3/1/26 6:15 AM, Jens Axboe wrote:
>>>>> On 2/28/26 6:47 PM, Sasha Levin wrote:
>>>>>> The patch below does not apply to the 6.1-stable tree.
>>>>>> If someone wants it applied there, or to any other stable or longterm
>>>>>> tree, then please email the backport, including the original git commit
>>>>>> id to <stable@vger.kernel.org>.
>>>>>
>>>>> And this one also picks cleanly into 6.1-stable. Not sure what is
>>>>> going on at your end?
>>>>
>>>> Are these and the other "FAILED" false positives getting applied or
>>>> not? I didn't hear anything back on any of them.
>>>
>>> Appologies for all of this. There's an explanation of what happened here:
>>> https://lore.kernel.org/all/aaWWE5uQqz_eG69i@laps/
>>>
>>> These should be part of the -rc2 I did earlier today.
>>
>> Gotcha, yeah it's not easy to know when you don't hear back, either
>> as a reply or as a new "added to stable" email. For those of us that
>> do take stable seriously, I 100% need to know if something is landing
>> or not.
>
> You're right (and thanks for all the backports!). I had a plan to
> review all of these again after the release, but I should have sent
> something out first.
Sounds good, it was more of a note for the future, should something like
this happen again.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-03-02 21:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01 1:47 FAILED: Patch "io_uring/filetable: clamp alloc_hint to the configured alloc range" failed to apply to 6.1-stable tree Sasha Levin
2026-03-01 13:15 ` Jens Axboe
2026-03-02 20:38 ` Jens Axboe
2026-03-02 20:41 ` Sasha Levin
2026-03-02 20:45 ` Jens Axboe
2026-03-02 20:58 ` Sasha Levin
2026-03-02 21:08 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox