Skip to content

Commit

Permalink
powerpc/crypto: Add cond_resched() in crc-vpmsum self-test
Browse files Browse the repository at this point in the history
The stress test for vpmsum implementations executes a long for loop in
the kernel. This blocks the scheduler, which prevents other tasks from
running, resulting in a warning.

This fix adds a call to cond_reshed() at the end of each loop, which
allows the scheduler to run other tasks as required.

Signed-off-by: Chris Smart <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
csmart authored and mpe committed Nov 13, 2019
1 parent b171397 commit 9f0acf9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/crypto/crc-vpmsum_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ static int __init crc_test_init(void)
crc32, verify32, len);
break;
}
cond_resched();
}
pr_info("crc-vpmsum_test done, completed %lu iterations\n", i);
} while (0);
Expand Down

0 comments on commit 9f0acf9

Please sign in to comment.