Rng reads in chaoskey driver could return the same data under the certain conditions.
Signed-off-by: Alexander Inyukhin <shur...@sectorb.msk.ru> --- diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c --- a/drivers/usb/misc/chaoskey.c +++ b/drivers/usb/misc/chaoskey.c @@ -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; -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html