Commit e542cd0a authored by Alexander Inyukhin's avatar Alexander Inyukhin Committed by Greg Kroah-Hartman

USB: chaoskey read offset bug

commit 1d5c47f5 upstream.

Rng reads in chaoskey driver could return the same data under
the certain conditions.
Signed-off-by: default avatarAlexander Inyukhin <shurick@sectorb.msk.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c5a69e5
......@@ -472,7 +472,7 @@ static int chaoskey_rng_read(struct hwrng *rng, void *data,
if (this_time > max)
this_time = max;
memcpy(data, dev->buf, this_time);
memcpy(data, dev->buf + dev->used, this_time);
dev->used += this_time;
......
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