Re: [PATCH v2 1/2] s390: uv: Fix loop condition in uv_find_secrets
From: Heiko Carstens
Date: Wed Aug 12 2026 - 06:24:07 EST
On Tue, Aug 11, 2026 at 06:14:21PM +0200, Steffen Eiden wrote:
> Nothing modified `start_idx` between the assignment and the comparison,
> so the condition was always false and the do/while ran exactly once
> even when the UV returned UVC_RC_MORE_DATA. Systems with more than
> 85 UV secrets got -ENOENT for any secret past the first page.
If you would leave the first sentence away this would be much more readable.
Starting like above makes me wonder: "what is this all about? context?".
> Fix this by setting the start index at the beginning of the loop not at
Please add reference to the function where you fix a loop.
> the end. First test if there are more secrets left by comparing
> start_idx with list->next_secret_idx, and then set the start index to the
> next secret index.
>
> Fixes: 7c9137af2042 ("s390/uv: Retrieve UV secrets support")
> Acked-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
> ---
> arch/s390/kernel/uv.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Please also fix the patch subject: It should be "s390/uv:"
instead of "s390: uv:".