Fix for PAGE_SIZE / PAGE_MASK magic number.

Change-Id: Icc00594d84a33495af774096ae13f830e29be39f
Fujitsu: POSTK_DEBUG_ARCH_DEP_116
This commit is contained in:
Shiratori, Takehiro
2018-11-29 16:00:59 +09:00
committed by Dominique Martinet
parent 516ab87ab9
commit 9e5472bb94
3 changed files with 10 additions and 6 deletions

View File

@ -3100,7 +3100,7 @@ getcred(int *_buf)
struct syscall_request request IHK_DMA_ALIGN;
unsigned long phys;
if((((unsigned long)_buf) ^ ((unsigned long)(_buf + 8))) & ~4095)
if ((((unsigned long)_buf) ^ ((unsigned long)(_buf + 8))) & PAGE_MASK)
buf = _buf + 8;
else
buf = _buf;
@ -5757,7 +5757,8 @@ long do_futex(int n, unsigned long arg0, unsigned long arg1,
request.number = n;
unsigned long __phys;
if((((unsigned long)tv) ^ ((unsigned long)(tv + 1))) & ~4095)
if ((((unsigned long)tv) ^
((unsigned long)(tv + 1))) & PAGE_MASK)
tv_now = tv + 1;
if (ihk_mc_pt_virt_to_phys(cpu_local_var(current)->vm->address_space->page_table,
(void *)tv_now, &__phys)) {