summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorBradley Bolen <bradleybolen@gmail.com>2019-11-17 04:00:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 14:12:29 +0300
commit87d2800e493f9b91857e078041ecc058bff9f3ef (patch)
tree596722b7001f3a3f2f5e13596cd1dc10f09c55b9 /include/linux/mmc
parentbe2b56a7f6df0fa3a10ecc0a6f92aff0f8e982ce (diff)
downloadlinux-87d2800e493f9b91857e078041ecc058bff9f3ef.tar.xz
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/linux/mmc')
-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 279b39008a33..de81ed857ea3 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -226,7 +226,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 */