mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
UBI: fix 64-bit calculations
Signed-off-by: Bruce Leonard <brucle@selinc.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
23add7455c
commit
73789a3d9f
@ -437,7 +437,8 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file,
|
||||
break;
|
||||
}
|
||||
|
||||
rsvd_bytes = vol->reserved_pebs * (ubi->leb_size-vol->data_pad);
|
||||
rsvd_bytes = (long long)vol->reserved_pebs *
|
||||
ubi->leb_size-vol->data_pad;
|
||||
if (bytes < 0 || bytes > rsvd_bytes) {
|
||||
err = -EINVAL;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user