summaryrefslogtreecommitdiffstats
path: root/samples/trace_events
diff options
context:
space:
mode:
authorYASUAKI ISHIMATSU <yasu.isimatu@gmail.com>2017-10-03 16:16:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-03 17:54:25 -0700
commit1dd2bfc86818ddbc95f98e312e7704350223fd7d (patch)
tree394d0f26cd302875089057232dca4c13fd4c82de /samples/trace_events
parentc9653850c90d6050197bc76ba672e00a7771aea5 (diff)
downloadblackbird-obmc-linux-1dd2bfc86818ddbc95f98e312e7704350223fd7d.tar.gz
blackbird-obmc-linux-1dd2bfc86818ddbc95f98e312e7704350223fd7d.zip
mm/memory_hotplug: change pfn_to_section_nr/section_nr_to_pfn macro to inline function
pfn_to_section_nr() and section_nr_to_pfn() are defined as macro. pfn_to_section_nr() has no issue even if it is defined as macro. But section_nr_to_pfn() has overflow issue if sec is defined as int. section_nr_to_pfn() just shifts sec by PFN_SECTION_SHIFT. If sec is defined as unsigned long, section_nr_to_pfn() returns pfn as 64 bit value. But if sec is defined as int, section_nr_to_pfn() returns pfn as 32 bit value. __remove_section() calculates start_pfn using section_nr_to_pfn() and scn_nr defined as int. So if hot-removed memory address is over 16TB, overflow issue occurs and section_nr_to_pfn() does not calculate correct pfn. To make callers use proper arg, the patch changes the macros to inline functions. Fixes: 815121d2b5cd ("memory_hotplug: clear zone when removing the memory") Link: http://lkml.kernel.org/r/e643a387-e573-6bbf-d418-c60c8ee3d15e@gmail.com Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Xishi Qiu <qiuxishi@huawei.com> Cc: Reza Arbab <arbab@linux.vnet.ibm.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'samples/trace_events')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud