forked from luck/tmp_suning_uos_patched
UBI: fix signed-unsigned multiplication
There is signed multiplication assigned to unsigned ei.addr in io.c. This causes wrong addresses for big multiplication.This patch solves the problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
84a9258062
commit
2f176f7987
@ -298,7 +298,7 @@ static int do_sync_erase(const struct ubi_device *ubi, int pnum)
|
||||
memset(&ei, 0, sizeof(struct erase_info));
|
||||
|
||||
ei.mtd = ubi->mtd;
|
||||
ei.addr = pnum * ubi->peb_size;
|
||||
ei.addr = (loff_t)pnum * ubi->peb_size;
|
||||
ei.len = ubi->peb_size;
|
||||
ei.callback = erase_callback;
|
||||
ei.priv = (unsigned long)&wq;
|
||||
|
Loading…
Reference in New Issue
Block a user