Commit 63b8ea5e authored by Jason A. Donenfeld's avatar Jason A. Donenfeld

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: 1b388e77 ("random: convert to using fops->read_iter()")
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
parent c01d4d0a
...@@ -408,7 +408,7 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter) ...@@ -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 * 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. * forever, so that we still retain forward secrecy in that case.
*/ */
crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE); crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment