summaryrefslogtreecommitdiffstats
path: root/drivers/char/random.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-06-20 11:03:48 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-06-20 11:06:17 +0200
commit63b8ea5e4f1a87dea4d3114293fc8e96a8f193d7 (patch)
treed13ba427fd365800359fe778dbeb80a7c8a3dc47 /drivers/char/random.c
parentrandom: quiet urandom warning ratelimit suppression message (diff)
downloadlinux-63b8ea5e4f1a87dea4d3114293fc8e96a8f193d7.tar.xz
linux-63b8ea5e4f1a87dea4d3114293fc8e96a8f193d7.zip
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: 1b388e7765f2 ("random: convert to using fops->read_iter()") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/char/random.c')
-rw-r--r--drivers/char/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 07a022e24057..e3dd1dd3dd22 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -408,7 +408,7 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter)
/*
* Immediately overwrite the ChaCha key at index 4 with random
- * bytes, in case userspace causes copy_to_user() below to sleep
+ * bytes, in case userspace causes copy_to_iter() below to sleep
* forever, so that we still retain forward secrecy in that case.
*/
crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE);