Skip to content

Commit

Permalink
crypto: algboss - remove NULL check in cryptomgr_schedule_probe()
Browse files Browse the repository at this point in the history
The for loop will be executed at least once, so i > 0. If the loop
is interrupted before i is incremented (e.g., when checking len for NULL),
i will not be checked.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Roman Smirnov authored and Herbert Xu committed Apr 12, 2024
1 parent 233e750 commit ea32d54
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crypto/algboss.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
goto err_free_param;
}

if (!i)
goto err_free_param;

param->tb[i + 1] = NULL;

param->type.attr.rta_len = sizeof(param->type);
Expand Down

0 comments on commit ea32d54

Please sign in to comment.