Re: [PATCH] mm/memory_hotplug: fix wrong casting for __remove_section()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 12-09-17 13:05:39, YASUAKI ISHIMATSU wrote:
> Hi Michal,
> 
> Thanks you for reviewing my patch.
> 
> On 09/12/2017 08:49 AM, Michal Hocko wrote:
> > On Fri 08-09-17 16:43:04, YASUAKI ISHIMATSU wrote:
> >> __remove_section() calls __remove_zone() to shrink zone and pgdat.
> >> But due to wrong castings, __remvoe_zone() cannot shrink zone
> >> and pgdat correctly if pfn is over 0xffffffff.
> >>
> >> So the patch fixes the following 3 wrong castings.
> >>
> >>   1. find_smallest_section_pfn() returns 0 or start_pfn which defined
> >>      as unsigned long. But the function always returns 32bit value
> >>      since the function is defined as int.
> >>
> >>   2. find_biggest_section_pfn() returns 0 or pfn which defined as
> >>      unsigned long. the function always returns 32bit value
> >>      since the function is defined as int.
> > 
> > this is indeed wrong. Pfns over would be really broken 15TB. Not that
> > unrealistic these days
> 
> Why 15TB?

0xffffffff>>28

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux