diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2023-04-23 14:10:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-10 22:53:37 +0300 |
commit | a5f643ab11631095c60c9852705220edf1659d6f (patch) | |
tree | 52751f32fb33354849764fb8c89fb22b0ec3db25 /COPYING | |
parent | 33420a82067b5c9975426bbba4d551dc24389de6 (diff) | |
download | linux-a5f643ab11631095c60c9852705220edf1659d6f.tar.xz |
ubi: Refuse attaching if mtd's erasesize is 0
[ Upstream commit 017c73a34a661a861712f7cc1393a123e5b2208c ]
There exists mtd devices with zero erasesize, which will trigger a
divide-by-zero exception while attaching ubi device.
Fix it by refusing attaching if mtd's erasesize is 0.
Fixes: 801c135ce73d ("UBI: Unsorted Block Images")
Reported-by: Yu Hao <yhao016@ucr.edu>
Link: https://lore.kernel.org/lkml/977347543.226888.1682011999468.JavaMail.zimbra@nod.at/T/
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions