Re: [PATCH v2 1/2] mm: migrate: prevent racy access to tlb_flush_pending

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

 



Hi Nadav,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.13-rc2 next-20170728]
[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/Nadav-Amit/mm-fixes-of-tlb_flush_pending/20170728-034608
config: blackfin-BF537-STAMP_defconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:4:0,
                    from arch/blackfin/include/asm/bug.h:71,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/gfp.h:4,
                    from include/linux/slab.h:14,
                    from kernel/fork.c:14:
   kernel/fork.c: In function 'mm_init':
>> kernel/fork.c:810:16: error: 'struct mm_struct' has no member named 'tlb_flush_pending'
     atomic_set(&mm->tlb_flush_pending, 0);
                   ^
   include/linux/compiler.h:329:17: note: in definition of macro 'WRITE_ONCE'
     union { typeof(x) __val; char __c[1]; } __u = \
                    ^
   kernel/fork.c:810:2: note: in expansion of macro 'atomic_set'
     atomic_set(&mm->tlb_flush_pending, 0);
     ^~~~~~~~~~
>> kernel/fork.c:810:16: error: 'struct mm_struct' has no member named 'tlb_flush_pending'
     atomic_set(&mm->tlb_flush_pending, 0);
                   ^
   include/linux/compiler.h:330:30: note: in definition of macro 'WRITE_ONCE'
      { .__val = (__force typeof(x)) (val) }; \
                                 ^
   kernel/fork.c:810:2: note: in expansion of macro 'atomic_set'
     atomic_set(&mm->tlb_flush_pending, 0);
     ^~~~~~~~~~
>> kernel/fork.c:810:16: error: 'struct mm_struct' has no member named 'tlb_flush_pending'
     atomic_set(&mm->tlb_flush_pending, 0);
                   ^
   include/linux/compiler.h:331:22: note: in definition of macro 'WRITE_ONCE'
     __write_once_size(&(x), __u.__c, sizeof(x)); \
                         ^
   kernel/fork.c:810:2: note: in expansion of macro 'atomic_set'
     atomic_set(&mm->tlb_flush_pending, 0);
     ^~~~~~~~~~
>> kernel/fork.c:810:16: error: 'struct mm_struct' has no member named 'tlb_flush_pending'
     atomic_set(&mm->tlb_flush_pending, 0);
                   ^
   include/linux/compiler.h:331:42: note: in definition of macro 'WRITE_ONCE'
     __write_once_size(&(x), __u.__c, sizeof(x)); \
                                             ^
   kernel/fork.c:810:2: note: in expansion of macro 'atomic_set'
     atomic_set(&mm->tlb_flush_pending, 0);
     ^~~~~~~~~~

vim +810 kernel/fork.c

   787	
   788	static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,
   789		struct user_namespace *user_ns)
   790	{
   791		mm->mmap = NULL;
   792		mm->mm_rb = RB_ROOT;
   793		mm->vmacache_seqnum = 0;
   794		atomic_set(&mm->mm_users, 1);
   795		atomic_set(&mm->mm_count, 1);
   796		init_rwsem(&mm->mmap_sem);
   797		INIT_LIST_HEAD(&mm->mmlist);
   798		mm->core_state = NULL;
   799		atomic_long_set(&mm->nr_ptes, 0);
   800		mm_nr_pmds_init(mm);
   801		mm->map_count = 0;
   802		mm->locked_vm = 0;
   803		mm->pinned_vm = 0;
   804		memset(&mm->rss_stat, 0, sizeof(mm->rss_stat));
   805		spin_lock_init(&mm->page_table_lock);
   806		mm_init_cpumask(mm);
   807		mm_init_aio(mm);
   808		mm_init_owner(mm, p);
   809		mmu_notifier_mm_init(mm);
 > 810		atomic_set(&mm->tlb_flush_pending, 0);
   811	#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
   812		mm->pmd_huge_pte = NULL;
   813	#endif
   814	
   815		if (current->mm) {
   816			mm->flags = current->mm->flags & MMF_INIT_MASK;
   817			mm->def_flags = current->mm->def_flags & VM_INIT_DEF_MASK;
   818		} else {
   819			mm->flags = default_dump_filter;
   820			mm->def_flags = 0;
   821		}
   822	
   823		if (mm_alloc_pgd(mm))
   824			goto fail_nopgd;
   825	
   826		if (init_new_context(p, mm))
   827			goto fail_nocontext;
   828	
   829		mm->user_ns = get_user_ns(user_ns);
   830		return mm;
   831	
   832	fail_nocontext:
   833		mm_free_pgd(mm);
   834	fail_nopgd:
   835		free_mm(mm);
   836		return NULL;
   837	}
   838	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]