]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:54:02 +0000 (10:54 +0200)
BugLink: https://bugs.launchpad.net/bugs/1986718
commit 63b8ea5e4f1a87dea4d3114293fc8e96a8f193d7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/char/random.c

index d6f2c62020b5defd761c257d56d649a367b4f4e3..7bd6eb15d432ee6f0f083d18fe33e4a339e19f71 100644 (file)
@@ -452,7 +452,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);