LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [kees:kspp/array-bounds/next-20210816/v1 10/10] kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]'
@ 2021-08-18 19:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-18 19:18 UTC (permalink / raw)
  To: Kees Cook; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 52390 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/array-bounds/next-20210816/v1
head:   b07d5e8190ca172b1ffddd1412b921296000b379
commit: b07d5e8190ca172b1ffddd1412b921296000b379 [10/10] Makefile: Enable -Wzero-length-bounds
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=b07d5e8190ca172b1ffddd1412b921296000b379
        git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
        git fetch --no-tags kees kspp/array-bounds/next-20210816/v1
        git checkout b07d5e8190ca172b1ffddd1412b921296000b379
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'of_css':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_file_write':
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_get_e_css':
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   kernel/cgroup/cgroup.c:590:34: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     590 |         css = init_css_set.subsys[ss->id];
         |               ~~~~~~~~~~~~~~~~~~~^~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
     205 |         struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
         |                                     ^~~~~~
   kernel/cgroup/cgroup.c:744:16: note: defined here 'init_css_set'
     744 | struct css_set init_css_set = {
         |                ^~~~~~~~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_subtree_control_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_controllers_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cpu_stat_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_freeze_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_max_descendants_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_max_depth_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_stat_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_events_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_type_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_seqfile_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_addrm_files':
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_e_css':
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   kernel/cgroup/cgroup.c:561:35: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     561 |         return init_css_set.subsys[ss->id];
         |                ~~~~~~~~~~~~~~~~~~~^~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
     205 |         struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
         |                                     ^~~~~~
   kernel/cgroup/cgroup.c:744:16: note: defined here 'init_css_set'
     744 | struct css_set init_css_set = {
         |                ^~~~~~~~~~~~
   kernel/cgroup/cgroup.c: In function 'cgroup_taskset_next':
   kernel/cgroup/cgroup.c:2395:57: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
    2395 |                                 *dst_cssp = cset->subsys[tset->ssid];
         |                                             ~~~~~~~~~~~~^~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
     205 |         struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
         |                                     ^~~~~~
   kernel/cgroup/cgroup.c:2393:70: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
    2393 |                                 *dst_cssp = cset->mg_dst_cset->subsys[tset->ssid];
         |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
     205 |         struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
         |                                     ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_rm_cftypes':
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   kernel/cgroup/cgroup.c: In function 'css_task_iter_start':
>> kernel/cgroup/cgroup.c:4647:32: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct list_head[0]' [-Wzero-length-bounds]
    4647 |                 it->cset_pos = &css->cgroup->e_csets[css->ss->id];
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:443:26: note: while referencing 'e_csets'
     443 |         struct list_head e_csets[CGROUP_SUBSYS_COUNT];
         |                          ^~~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function '__cgroup_procs_start':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'cgroup_procs_start':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
     403 |         typeof(p) ________p1 = READ_ONCE(p); \
         |                                ^~~~~~~~~
   kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
     651 |                 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
         |                        ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~
   In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:264,
                    from include/uapi/linux/swab.h:6,
                    from include/linux/swab.h:5,
                    from arch/arm/include/asm/opcodes.h:86,
                    from arch/arm/include/asm/bug.h:7,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   kernel/cgroup/cgroup.c: In function 'css_tryget_online_from_dir':
   kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
     389 |         typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                       ^~~~~~~~~
   include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
     528 |         __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
     476 |                 return rcu_dereference_check(cgrp->subsys[ss->id],
         |                        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/cgroup.h:28,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/cgroup.c:31:
   include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
     426 |         struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
         |                                           ^~~~~~


vim +651 kernel/cgroup/cgroup.c

aade7f9efba098 kernel/cgroup/cgroup.c Roman Gushchin 2019-04-19  636  
b41686401e5014 kernel/cgroup.c        Tejun Heo      2014-05-13  637  struct cgroup_subsys_state *of_css(struct kernfs_open_file *of)
59f5296b51b867 kernel/cgroup.c        Tejun Heo      2014-02-11  638  {
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  639  	struct cgroup *cgrp = of->kn->parent->priv;
b41686401e5014 kernel/cgroup.c        Tejun Heo      2014-05-13  640  	struct cftype *cft = of_cft(of);
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  641  
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  642  	/*
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  643  	 * This is open and unprotected implementation of cgroup_css().
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  644  	 * seq_css() is only called from a kernfs file operation which has
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  645  	 * an active reference on the file.  Because all the subsystem
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  646  	 * files are drained before a css is disassociated with a cgroup,
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  647  	 * the matching css from the cgroup's subsys table is guaranteed to
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  648  	 * be and stay valid until the enclosing operation is complete.
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  649  	 */
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  650  	if (cft->ss)
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11 @651  		return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
2bd59d48ebfb3d kernel/cgroup.c        Tejun Heo      2014-02-11  652  	else
9d800df12d3173 kernel/cgroup.c        Tejun Heo      2014-05-14  653  		return &cgrp->self;
59f5296b51b867 kernel/cgroup.c        Tejun Heo      2014-02-11  654  }
b41686401e5014 kernel/cgroup.c        Tejun Heo      2014-05-13  655  EXPORT_SYMBOL_GPL(of_css);
59f5296b51b867 kernel/cgroup.c        Tejun Heo      2014-02-11  656  

:::::: The code at line 651 was first introduced by commit
:::::: 2bd59d48ebfb3df41ee56938946ca0dd30887312 cgroup: convert to kernfs

:::::: TO: Tejun Heo <tj@kernel.org>
:::::: CC: Tejun Heo <tj@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54462 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-18 19:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 19:18 [kees:kspp/array-bounds/next-20210816/v1 10/10] kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).