diff options
| author | Akinobu Mita <akinobu.mita@gmail.com> | 2024-12-08 23:24:15 +0900 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-12 20:21:00 -0800 |
| commit | e9bc360b105c2042db30c36ed1c5ca48dcc7f84b (patch) | |
| tree | fcb289b53b70ab68c6fa7a2fdadeb30fa8186641 /scripts/checkpatch.pl | |
| parent | checkpatch: check return of `git_commit_info` (diff) | |
| download | linux-e9bc360b105c2042db30c36ed1c5ca48dcc7f84b.tar.gz linux-e9bc360b105c2042db30c36ed1c5ca48dcc7f84b.zip | |
fault-inject: use prandom where cryptographically secure randomness is not needed
Currently get_random*() is used to determine the probability of fault
injection, but cryptographically secure random numbers are not required.
There is no big problem in using prandom instead of get_random*() to
determine the probability of fault injection, and it also avoids acquiring
a spinlock, which is unsafe in some contexts.
[akpm@linux-foundation.org: tweak and reflow comment]
Link: https://lore.kernel.org/lkml/20241129120939.GG35539@noisy.programming.kicks-ass.net
Link: https://lkml.kernel.org/r/20241208142415.205960-1-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions
