random: update comment from copy_to_user() -> copy_to_iter()
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 20 Jun 2022 09:03:48 +0000 (11:03 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 20 Jun 2022 09:06:17 +0000 (11:06 +0200)
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>
drivers/char/random.c

index 07a022e240573743d41978200e4c65f2057e4bd7..e3dd1dd3dd226845bce6146f78b6b0d8979a7638 100644 (file)
@@ -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);