Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs/ufs: avoid potential u32 multiplication overflow
The 64 bit ino is being compared to the product of two u32 values, however, the multiplication is being performed using a 32 bit multiply so there is a potential of an overflow. To be fully safe, cast uspi->s_ncg to a u64 to ensure a 64 bit multiplication occurs to avoid any chance of overflow. Fixes: f3e2a52 ("ufs: NFS support") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Evgeniy Dushistov <[email protected]> Cc: Alexey Dobriyan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Addresses-Coverity: ("Unintentional integer overflow") Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information