Commit 7aed9f7
net/route: use get_random_int for random counter
Using get_random_int here is faster, more fitting of the use case, and
just as cryptographically secure. It also has the benefit of providing
better randomness at early boot, which is when many of these structures
are assigned.
Also, semantically, it's not really proper to have been assigning an
atomic_t in this way before, even if in practice it works fine.
Signed-off-by: Jason A. Donenfeld <[email protected]>
Cc: David Miller <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>1 parent b3d0f78 commit 7aed9f7
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2936 | 2936 | | |
2937 | 2937 | | |
2938 | 2938 | | |
2939 | | - | |
2940 | | - | |
| 2939 | + | |
2941 | 2940 | | |
2942 | 2941 | | |
2943 | 2942 | | |
| |||
0 commit comments