mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
ceph: fix possible integer overflow in ceph_zero_objects()
[ Upstream commit 0abd87942e
]
In 'ceph_zero_objects', promote 'object_size' to 'u64' to avoid possible
integer overflow.
Compile tested only.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bb78405750
commit
12a7802d4c
|
@ -2043,7 +2043,7 @@ static int ceph_zero_objects(struct inode *inode, loff_t offset, loff_t length)
|
|||
s32 stripe_unit = ci->i_layout.stripe_unit;
|
||||
s32 stripe_count = ci->i_layout.stripe_count;
|
||||
s32 object_size = ci->i_layout.object_size;
|
||||
u64 object_set_size = object_size * stripe_count;
|
||||
u64 object_set_size = (u64) object_size * stripe_count;
|
||||
u64 nearly, t;
|
||||
|
||||
/* round offset up to next period boundary */
|
||||
|
|
Loading…
Reference in New Issue
Block a user