Re: [PATCH 1/5] resource: Mark free space assigned

From: Bradley Morgan

Date: Wed Sep 23 2026 - 12:32:57 EST


On 23 September 2026 14:17:51 BST, "Ilpo Järvinen"
<ilpo.jarvinen@xxxxxxxxxxxxxxx> wrote:
>Free space ranges are (part of) assigned ranges. Since new resources
>have IORESOURCE_UNSET, the flag gets copied also to full_avail.flags,
>which hampers printing them with %pR.
>
>Clear IORESOURCE_UNSET for the free space indicator resource.
>

LGTM, thanks.

Reviewed-by: Bradley Morgan <brads@xxxxxxxxxxxxxx>


>Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
>---
> kernel/resource.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/kernel/resource.c b/kernel/resource.c
>index e60539a55541..17e7fccd859c 100644
>--- a/kernel/resource.c
>+++ b/kernel/resource.c
>@@ -731,6 +731,7 @@ static int __find_resource_space(struct resource *root, struct resource *old,
> resource_alignf alignf = constraint->alignf;
>
> full_avail.start = root->start;
>+ full_avail.flags &= ~IORESOURCE_UNSET;
> /*
> * Skip past an allocated resource that starts at 0, since the assignment
> * of this->start - 1 to full_avail->end below would cause an underflow.
>

--- Thanks!
"I'm not a very positive person" - Linus torvalds