diff options
| author | 2021-06-29 09:51:58 +0200 | |
|---|---|---|
| committer | 2021-06-29 09:51:58 +0200 | |
| commit | d8c032145fccfead0c3f733e7b6aaa4e81f9d326 (patch) | |
| tree | 7b150b83d4341c8bc646f33a7b0cb928dab4ee8a /include | |
| parent | Merge branch 'for-5.14-vsprintf-pts' into for-linus (diff) | |
| parent | random32: Fix implicit truncation warning in prandom_seed_state() (diff) | |
Merge branch 'for-5.14-vsprintf-scanf' into for-linus
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/prandom.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/prandom.h b/include/linux/prandom.h index bbf4b4ad61df..056d31317e49 100644 --- a/include/linux/prandom.h +++ b/include/linux/prandom.h @@ -111,7 +111,7 @@ static inline u32 __seed(u32 x, u32 m) */ static inline void prandom_seed_state(struct rnd_state *state, u64 seed) { - u32 i = (seed >> 32) ^ (seed << 10) ^ seed; + u32 i = ((seed >> 32) ^ (seed << 10) ^ seed) & 0xffffffffUL; state->s1 = __seed(i, 2U); state->s2 = __seed(i, 8U); |
