aboutsummaryrefslogtreecommitdiff
path: root/crypto/algboss.c
diff options
context:
space:
mode:
authorNicolin Chen2019-07-26 12:34:33 -0700
committerChristoph Hellwig2019-07-29 09:50:04 +0300
commitf46cc0152501e46d1b3aa5e7eade61145070eab0 (patch)
treee8a0e7e34e2b9105ef60aa01ebd8eaf6faf9bfe3 /crypto/algboss.c
parentc6622a425acd1d2f3a443cd39b490a8777b622d7 (diff)
dma-contiguous: page-align the size in dma_free_contiguous()
According to the original dma_direct_alloc_pages() code: { unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; if (!dma_release_from_contiguous(dev, page, count)) __free_pages(page, get_order(size)); } The count parameter for dma_release_from_contiguous() was page aligned before the right-shifting operation, while the new API dma_free_contiguous() forgets to have PAGE_ALIGN() at the size. So this patch simply adds it to prevent any corner case. Fixes: fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers") Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'crypto/algboss.c')
0 files changed, 0 insertions, 0 deletions