summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBradley Bolen <bradleybolen@gmail.com>2019-11-16 20:00:45 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 13:14:28 +0200
commit5b686ce8126c971bdab261707296f4d26a71ac4e (patch)
tree85890d7a9ac57029c006ef682c38f040b8e9923f /include
parent1ff84e6366b02643667b9a50548e07422afc0757 (diff)
mmc: core: Fix size overflow for mmc partitions
[ Upstream commit f3d7c2292d104519195fdb11192daec13229c219 ] With large eMMC cards, it is possible to create general purpose partitions that are bigger than 4GB. The size member of the mmc_part struct is only an unsigned int which overflows for gp partitions larger than 4GB. Change this to a u64 to handle the overflow. Signed-off-by: Bradley Bolen <bradleybolen@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 8ef330027b13..3f8e84a80b4a 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -227,7 +227,7 @@ struct mmc_queue_req;
* MMC Physical partitions
*/
struct mmc_part {
- unsigned int size; /* partition size (in bytes) */
+ u64 size; /* partition size (in bytes) */
unsigned int part_cfg; /* partition type */
char name[MAX_MMC_PART_NAME_LEN];
bool force_ro; /* to make boot parts RO by default */