Skip to content

Commit 63b8ea5

Browse files
committed
random: update comment from copy_to_user() -> copy_to_iter()
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]>
1 parent c01d4d0 commit 63b8ea5

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
@@ -408,7 +408,7 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter)
408408

409409
/*
410410
* Immediately overwrite the ChaCha key at index 4 with random
411-
* bytes, in case userspace causes copy_to_user() below to sleep
411+
* bytes, in case userspace causes copy_to_iter() below to sleep
412412
* forever, so that we still retain forward secrecy in that case.
413413
*/
414414
crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE);

0 commit comments

Comments
 (0)