summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/page.c
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2016-08-03 17:55:00 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-08-08 15:41:31 +0200
commit134a24cd895c5d138d639a0741ad27e389cd4562 (patch)
treec832c8b62e5b75a67a3fe840f0b174657e8ce977 /fs/nilfs2/page.c
parentbf47dc572aaf53c3f2311c71e03ec01be3131fd6 (diff)
downloadlinux-134a24cd895c5d138d639a0741ad27e389cd4562.tar.bz2
s390/crc32-vx: Fix checksum calculation for small sizes
The current prealign logic will fail for sizes < alignment, as the new datalen passed to the vector function is smaller than zero. Being a size_t this gets wrapped to a huge number causing memory overruns and wrong data. Let's add an early exit if the size is smaller than the minimal size with alignment. This will also avoid calling the software fallback twice for all sizes smaller than the minimum size (prealign + remaining) Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Fixes: f848dbd3bc1a ("s390/crc32-vx: add crypto API module for optimized CRC-32 algorithms") Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'fs/nilfs2/page.c')
0 files changed, 0 insertions, 0 deletions