]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/iomap.c
iomap: fix integer truncation issues in the zeroing and dirtying helpers
authorChristoph Hellwig <hch@lst.de>
Fri, 11 Aug 2017 19:45:35 +0000 (12:45 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 11 Aug 2017 23:56:33 +0000 (16:56 -0700)
commite28ae8e428fefe2facd72cea9f29906ecb9c861d
treea78610c117be8103f6a1c87ea44327cfab4537fe
parentc44245b3d5435f533ca8346ece65918f84c057f9
iomap: fix integer truncation issues in the zeroing and dirtying helpers

Fix the min_t calls in the zeroing and dirtying helpers to perform the
comparisms on 64-bit types, which prevents them from incorrectly
being truncated, and larger zeroing operations being stuck in a never
ending loop.

Special thanks to Markus Stockhausen for spotting the bug.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/iomap.c