Skip to content

Conversation

@dovydenkovas
Copy link

By design done variable should be set to false and changed to true, when thread finished. But for now, done is not initialized.

done is used in the loop to check finish status and then as the return value. An uninitialized variable contains a random value. In most cases, this is interpreted as true and leads to early function termination and an incorrect return value.

Signed-off-by: Aleksandr Dovydenkov asd@altlinux.org.
Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fix an uninitialized entry->finished variable, that led to early
function termination and an incorrect return value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant