[cgroup:review-cgroup-reorg 8/13] kernel/cgroup/cgroup-v1.c:52:14: error: 'cgroup_mutex' undeclared

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup-reorg
head:   8a6dc1a57dc250394be839aeb7741dc351e84da7
commit: 183e7e19c8e2dec9a4f64a3b40fe1c01e7c47f50 [8/13] cgroup: move cgroup v1 specific code to kernel/cgroup/cgroup-v1.c
config: i386-randconfig-s1-201651 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 183e7e19c8e2dec9a4f64a3b40fe1c01e7c47f50
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/mmu.h:5:0,
                    from include/linux/mm_types.h:17,
                    from include/linux/sched.h:27,
                    from include/linux/cgroup.h:11,
                    from kernel/cgroup/cgroup-internal.h:4,
                    from kernel/cgroup/cgroup-v1.c:1:
   kernel/cgroup/cgroup-v1.c: In function 'cgroup_attach_task_all':
>> kernel/cgroup/cgroup-v1.c:52:14: error: 'cgroup_mutex' undeclared (first use in this function)
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   kernel/cgroup/cgroup-v1.c:52:14: note: each undeclared identifier is reported only once for each function it appears in
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
>> kernel/cgroup/cgroup-v1.c:60:18: error: 'css_set_lock' undeclared (first use in this function)
      spin_lock_irq(&css_set_lock);
                     ^~~~~~~~~~~~
   In file included from arch/x86/include/asm/mmu.h:5:0,
                    from include/linux/mm_types.h:17,
                    from include/linux/sched.h:27,
                    from include/linux/cgroup.h:11,
                    from kernel/cgroup/cgroup-internal.h:4,
                    from kernel/cgroup/cgroup-v1.c:1:
   kernel/cgroup/cgroup-v1.c: In function 'cgroup_transfer_tasks':
   kernel/cgroup/cgroup-v1.c:100:14: error: 'cgroup_mutex' undeclared (first use in this function)
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   kernel/cgroup/cgroup-v1.c:105:17: error: 'css_set_lock' undeclared (first use in this function)
     spin_lock_irq(&css_set_lock);
                    ^~~~~~~~~~~~
   kernel/cgroup/cgroup-v1.c: In function 'cgroup_task_count':
   kernel/cgroup/cgroup-v1.c:342:17: error: 'css_set_lock' undeclared (first use in this function)
     spin_lock_irq(&css_set_lock);
                    ^~~~~~~~~~~~
   In file included from arch/x86/include/asm/mmu.h:5:0,
                    from include/linux/mm_types.h:17,
                    from include/linux/sched.h:27,
                    from include/linux/cgroup.h:11,
                    from kernel/cgroup/cgroup-internal.h:4,
                    from kernel/cgroup/cgroup-v1.c:1:
   kernel/cgroup/cgroup-v1.c: In function 'proc_cgroupstats_show':
   kernel/cgroup/cgroup-v1.c:642:14: error: 'cgroup_mutex' undeclared (first use in this function)
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   kernel/cgroup/cgroup-v1.c: In function 'cgroupstats_build':
   kernel/cgroup/cgroup-v1.c:687:14: error: 'cgroup_mutex' undeclared (first use in this function)
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   kernel/cgroup/cgroup-v1.c: In function 'cgroup_release_agent':
   kernel/cgroup/cgroup-v1.c:768:14: error: 'cgroup_mutex' undeclared (first use in this function)
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   kernel/cgroup/cgroup-v1.c:775:17: error: 'css_set_lock' undeclared (first use in this function)
     spin_lock_irq(&css_set_lock);
                    ^~~~~~~~~~~~
   In file included from arch/x86/include/asm/mmu.h:5:0,
                    from include/linux/mm_types.h:17,
                    from include/linux/sched.h:27,
                    from include/linux/cgroup.h:11,
                    from kernel/cgroup/cgroup-internal.h:4,
                    from kernel/cgroup/cgroup-v1.c:1:
   kernel/cgroup/cgroup-v1.c: In function 'cgroup_rename':
   kernel/cgroup/cgroup-v1.c:829:14: error: 'cgroup_mutex' undeclared (first use in this function)
     mutex_lock(&cgroup_mutex);
                 ^
   include/linux/mutex.h:160:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~

vim +/cgroup_mutex +52 kernel/cgroup/cgroup-v1.c

   > 1	#include "cgroup-internal.h"
     2	
     3	#include <linux/kmod.h>
     4	#include <linux/sort.h>
     5	#include <linux/mm.h>
     6	#include <linux/slab.h>
     7	#include <linux/vmalloc.h>
     8	#include <linux/delayacct.h>
     9	#include <linux/pid_namespace.h>
    10	#include <linux/cgroupstats.h>
    11	
    12	#include <trace/events/cgroup.h>
    13	
    14	/*
    15	 * pidlists linger the following amount before being destroyed.  The goal
    16	 * is avoiding frequent destruction in the middle of consecutive read calls
    17	 * Expiring in the middle is a performance problem not a correctness one.
    18	 * 1 sec should be enough.
    19	 */
    20	#define CGROUP_PIDLIST_DESTROY_DELAY	HZ
    21	
    22	/* Controllers blocked by the commandline in v1 */
    23	static u16 cgroup_no_v1_mask;
    24	
    25	/*
    26	 * pidlist destructions need to be flushed on cgroup destruction.  Use a
    27	 * separate workqueue as flush domain.
    28	 */
    29	static struct workqueue_struct *cgroup_pidlist_destroy_wq;
    30	
    31	/*
    32	 * Protects cgroup_subsys->release_agent_path.  Modifying it also requires
    33	 * cgroup_mutex.  Reading requires either cgroup_mutex or this spinlock.
    34	 */
    35	DEFINE_SPINLOCK(release_agent_path_lock);
    36	
    37	bool cgroup_ssid_no_v1(int ssid)
    38	{
    39		return cgroup_no_v1_mask & (1 << ssid);
    40	}
    41	
    42	/**
    43	 * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from'
    44	 * @from: attach to all cgroups of a given task
    45	 * @tsk: the task to be attached
    46	 */
    47	int cgroup_attach_task_all(struct task_struct *from, struct task_struct *tsk)
    48	{
    49		struct cgroup_root *root;
    50		int retval = 0;
    51	
  > 52		mutex_lock(&cgroup_mutex);
    53		percpu_down_write(&cgroup_threadgroup_rwsem);
    54		for_each_root(root) {
    55			struct cgroup *from_cgrp;
    56	
    57			if (root == &cgrp_dfl_root)
    58				continue;
    59	
  > 60			spin_lock_irq(&css_set_lock);
    61			from_cgrp = task_cgroup_from_root(from, root);
    62			spin_unlock_irq(&css_set_lock);
    63	

---
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 ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux