diff options
| author | Jason A. Donenfeld <[email protected]> | 2022-10-10 02:44:02 +0000 |
|---|---|---|
| committer | Jason A. Donenfeld <[email protected]> | 2022-11-18 01:15:15 +0000 |
| commit | 8032bf1233a74627ce69b803608e650f3f35971c (patch) | |
| tree | 1e15cd719358130192c59b8d5a61a0c3c9fbe82c /fs/ubifs/tnc_commit.c | |
| parent | random: add helpers for random numbers with given floor or range (diff) | |
| download | kernel-8032bf1233a74627ce69b803608e650f3f35971c.tar.gz kernel-8032bf1233a74627ce69b803608e650f3f35971c.zip | |
treewide: use get_random_u32_below() instead of deprecated function
This is a simple mechanical transformation done by:
@@
expression E;
@@
- prandom_u32_max
+ get_random_u32_below
(E)
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Darrick J. Wong <[email protected]> # for xfs
Reviewed-by: SeongJae Park <[email protected]> # for damon
Reviewed-by: Jason Gunthorpe <[email protected]> # for infiniband
Reviewed-by: Russell King (Oracle) <[email protected]> # for arm
Acked-by: Ulf Hansson <[email protected]> # for mmc
Signed-off-by: Jason A. Donenfeld <[email protected]>
Diffstat (limited to 'fs/ubifs/tnc_commit.c')
| -rw-r--r-- | fs/ubifs/tnc_commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c index 01362ad5f804..a55e04822d16 100644 --- a/fs/ubifs/tnc_commit.c +++ b/fs/ubifs/tnc_commit.c @@ -700,7 +700,7 @@ static int alloc_idx_lebs(struct ubifs_info *c, int cnt) c->ilebs[c->ileb_cnt++] = lnum; dbg_cmt("LEB %d", lnum); } - if (dbg_is_chk_index(c) && !prandom_u32_max(8)) + if (dbg_is_chk_index(c) && !get_random_u32_below(8)) return -ENOSPC; return 0; } |
