Re: [PATCH] mm/huge_memory: fix the memory leak due to the race

From: kbuild test robot
Date: Tue Jun 21 2016 - 10:34:28 EST


Hi,

[auto build test ERROR on v4.7-rc4]
[also build test ERROR on next-20160621]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/zhongjiang/mm-huge_memory-fix-the-memory-leak-due-to-the-race/20160621-221736
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64

All errors (new ones prefixed by >>):

In file included from arch/sparc/include/asm/pgalloc.h:4:0,
from arch/sparc/include/asm/tlb_64.h:6,
from arch/sparc/include/asm/tlb.h:4,
from mm/huge_memory.c:34:
mm/huge_memory.c: In function 'do_huge_pmd_wp_page':
>> mm/huge_memory.c:1383:25: error: incompatible type for argument 3 of 'pmd_set'
pmd_populate(mm, pmd, entry);
^
arch/sparc/include/asm/pgalloc_64.h:72:54: note: in definition of macro 'pmd_populate'
#define pmd_populate(MM, PMD, PTE) pmd_set(MM, PMD, PTE)
^
In file included from arch/sparc/include/asm/pgtable.h:4:0,
from include/linux/mm.h:68,
from mm/huge_memory.c:10:
arch/sparc/include/asm/pgtable_64.h:796:20: note: expected 'pte_t * {aka struct <anonymous> *}' but argument is of type 'pmd_t {aka struct <anonymous>}'
static inline void pmd_set(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep)
^

vim +/pmd_set +1383 mm/huge_memory.c

1377 entry = mk_huge_pmd(new_page, vma->vm_page_prot);
1378 entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
1379 pmdp_invalidate(vma, haddr, pmd);
1380 page_add_new_anon_rmap(new_page, vma, haddr, true);
1381 mem_cgroup_commit_charge(new_page, memcg, false, true);
1382 lru_cache_add_active_or_unevictable(new_page, vma);
> 1383 pmd_populate(mm, pmd, entry);
1384 update_mmu_cache_pmd(vma, address, pmd);
1385 if (!page) {
1386 add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR);

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data