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

USB: chaoskey read offset bug

Rng reads in chaoskey driver could return the same data under
the certain conditions.
Signed-off-by: default avatarAlexander Inyukhin <shurick@sectorb.msk.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8484bf29
......@@ -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