mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 08:53:41 +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;
|
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) {
|
if (bytes < 0 || bytes > rsvd_bytes) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user