Skip to content
Commit ee4f7bf3 authored by Chao Yu's avatar Chao Yu Committed by Paul Gortmaker
Browse files

f2fs: fix potential overflow



commit 1f0d5c91 upstream.

We expect 64-bit calculation result from below statement, however
in 32-bit machine, looped left shift operation on pgoff_t type
variable may cause overflow issue, fix it by forcing type cast.

page->index << PAGE_SHIFT;

Fixes: 26de9b11 ("f2fs: avoid unnecessary updating inode during fsync")
Fixes: 0a2aa8fb ("f2fs: refactor __exchange_data_block for speed up")
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent f5058e2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment