summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-05-19 20:04:17 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2022-05-19 20:04:17 -1000
commit3d7285a335edaf23b699e87c528cf0b0070e3293 (patch)
tree8753bade9f5d4448848ac1c46e3312b0233ebc1b /drivers
parentb015dcd62b86d298829990f8261d5d154b8d7af5 (diff)
parent16287397ec5c08aa58db6acf7dbc55470d78087d (diff)
downloadlinux-3d7285a335edaf23b699e87c528cf0b0070e3293.tar.bz2
Merge tag 'v5.18-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu: "Fix a regression in a recent fix to qcom-rng" * tag 'v5.18-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/qcom-rng.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/qcom-rng.c b/drivers/crypto/qcom-rng.c
index 11f30fd48c14..031b5f701a0a 100644
--- a/drivers/crypto/qcom-rng.c
+++ b/drivers/crypto/qcom-rng.c
@@ -65,6 +65,7 @@ static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max)
} else {
/* copy only remaining bytes */
memcpy(data, &val, max - currsize);
+ break;
}
} while (currsize < max);