mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes the following issues: - memory corruption when kmalloc fails in xts/lrw - mark some CCP DMA channels as private - fix reordering race in padata - regression in omap-rng DT description" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: xts,lrw - fix out-of-bounds write after kmalloc failure crypto: ccp - Make some CCP DMA channels private padata: avoid race in reordering dt-bindings: rng: clocks property on omap_rng not always mandatory
This commit is contained in:
commit
035f0cd3f8
7 changed files with 62 additions and 7 deletions
|
|
@ -286,8 +286,11 @@ static int init_crypt(struct skcipher_request *req, crypto_completion_t done)
|
|||
|
||||
subreq->cryptlen = LRW_BUFFER_SIZE;
|
||||
if (req->cryptlen > LRW_BUFFER_SIZE) {
|
||||
subreq->cryptlen = min(req->cryptlen, (unsigned)PAGE_SIZE);
|
||||
rctx->ext = kmalloc(subreq->cryptlen, gfp);
|
||||
unsigned int n = min(req->cryptlen, (unsigned int)PAGE_SIZE);
|
||||
|
||||
rctx->ext = kmalloc(n, gfp);
|
||||
if (rctx->ext)
|
||||
subreq->cryptlen = n;
|
||||
}
|
||||
|
||||
rctx->src = req->src;
|
||||
|
|
|
|||
|
|
@ -230,8 +230,11 @@ static int init_crypt(struct skcipher_request *req, crypto_completion_t done)
|
|||
|
||||
subreq->cryptlen = XTS_BUFFER_SIZE;
|
||||
if (req->cryptlen > XTS_BUFFER_SIZE) {
|
||||
subreq->cryptlen = min(req->cryptlen, (unsigned)PAGE_SIZE);
|
||||
rctx->ext = kmalloc(subreq->cryptlen, gfp);
|
||||
unsigned int n = min(req->cryptlen, (unsigned int)PAGE_SIZE);
|
||||
|
||||
rctx->ext = kmalloc(n, gfp);
|
||||
if (rctx->ext)
|
||||
subreq->cryptlen = n;
|
||||
}
|
||||
|
||||
rctx->src = req->src;
|
||||
|
|
|
|||
Loading…
Reference in a new issue