Re: [PATCH v2 1/2] s390: uv: Fix loop condition in uv_find_secrets

Heiko Carstens <[email protected]>
Newsgroups org.kernel.vger.linux-s390,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
> Signed-off-by: Steffen Eiden <[email protected]>
> ---
>  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:".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.