Skip to content

Commit 5641285

Browse files
zx2c4gregkh
authored andcommitted
random: update comment from copy_to_user() -> copy_to_iter()
commit 63b8ea5 upstream. This comment wasn't updated when we moved from read() to read_iter(), so this patch makes the trivial fix. Fixes: 1b388e7 ("random: convert to using fops->read_iter()") Signed-off-by: Jason A. Donenfeld <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ca83f50 commit 5641285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter)
451451

452452
/*
453453
* Immediately overwrite the ChaCha key at index 4 with random
454-
* bytes, in case userspace causes copy_to_user() below to sleep
454+
* bytes, in case userspace causes copy_to_iter() below to sleep
455455
* forever, so that we still retain forward secrecy in that case.
456456
*/
457457
crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE);

0 commit comments

Comments
 (0)