summaryrefslogtreecommitdiffstats
path: root/virt/kvm/coalesced_mmio.h
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2012-11-01 13:58:17 +0800
committerArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>2012-11-15 19:50:30 +0200
commit6f9f59ee2e254a7e997985d8eb708930da49245a (patch)
treeb2fe0de90ac6f12c33c9a281a4102df9afe5f08e /virt/kvm/coalesced_mmio.h
parent3e9ce49e0ef95e22790a74720f0068696b2477c9 (diff)
downloadlinux-stable-6f9f59ee2e254a7e997985d8eb708930da49245a.tar.gz
linux-stable-6f9f59ee2e254a7e997985d8eb708930da49245a.tar.bz2
linux-stable-6f9f59ee2e254a7e997985d8eb708930da49245a.zip
mtd: cmdlinepart: fix the overflow of big mtd partitions
When the kernel parses the following cmdline #mtdparts=gpmi-nand:16m(boot),16m(kernel),1g(home),4g(test),-(usr) for a big nand chip Micron MT29F64G08AFAAAWP(8GB), we got the following wrong result: ............................................. "mtd: partition size too small (0)" ............................................. We can not get any partition. The "4g(test)" partition triggers a overflow of the "size". The memparse() returns 4g to the "size", but the size is "unsigned long" type, so a overflow occurs, the "size" becomes zero in the end. This patch changes the "size"/"offset" to "unsigned long long" type, and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and OFFSET_CONTINUOUS. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'virt/kvm/coalesced_mmio.h')
0 files changed, 0 insertions, 0 deletions