The offset of hugepage block will not be 16G, if the expected
page is more than one. Calculate the totol size instead of the
hardcode value.
Signed-off-by: Rui Teng <redacted>
---
arch/powerpc/mm/hash_utils_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The offset of hugepage block will not be 16G, if the expected
page is more than one. Calculate the totol size instead of the
hardcode value.
I assume you found this by code inspection and not by triggering an
actual bug?
Yes, I found this problem only by code inspection. We were finding the
ways to enable 16G huge page besides changing the device tree. For example, provide a new interface to set these size and pages parameters.
So that I think it may cause problem here.
The offset of hugepage block will not be 16G, if the expected
page is more than one. Calculate the totol size instead of the
hardcode value.
Signed-off-by: Rui Teng <redacted>
I have a redundant patch, this one is the original.
Tested-by: Anshuman Khandual <redacted>
From: Michael Ellerman <hidden> Date: 2017-08-07 10:41:52
On Thu, 2017-01-12 at 09:09:06 UTC, Rui Teng wrote:
The offset of hugepage block will not be 16G, if the expected
page is more than one. Calculate the totol size instead of the
hardcode value.
Signed-off-by: Rui Teng <redacted>
Tested-by: Anshuman Khandual <redacted>