提交 1d5c47f5 编写于 作者: A Alexander Inyukhin 提交者: 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: NAlexander Inyukhin <shurick@sectorb.msk.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册