tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 72cf0d8c01acc7aa359dae193ac04980479036f2
commit: 85fb22459cd84a3cee1a1d36a32ba119f7b1c5e7 [26/47] cgroup-v1: add disabled
controller check in cgroup1_parse_param()
config: arm64-randconfig-s032-20210216 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 85fb22459cd84a3cee1a1d36a32ba119f7b1c5e7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/cgroup/cgroup-v1.c: In function 'cgroup1_parse_param':
> kernel/cgroup/cgroup-v1.c:927:12: error: implicit declaration of
function 'invalfc'; did you mean 'invalf'?
[-Werror=implicit-function-declaration]
927 | return invalfc(fc,
"Disabled controller '%s'",
| ^~~~~~~
| invalf
cc1: some warnings being treated as errors
vim +927 kernel/cgroup/cgroup-v1.c
906
907 int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
908 {
909 struct cgroup_fs_context *ctx = cgroup_fc2context(fc);
910 struct cgroup_subsys *ss;
911 struct fs_parse_result result;
912 int opt, i;
913
914 opt = fs_parse(fc, &cgroup1_fs_parameters, param, &result);
915 if (opt == -ENOPARAM) {
916 if (strcmp(param->key, "source") == 0) {
917 if (fc->source)
918 return invalf(fc, "Multiple sources not supported");
919 fc->source = param->string;
920 param->string = NULL;
921 return 0;
922 }
923 for_each_subsys(ss, i) {
924 if (strcmp(param->key, ss->legacy_name))
925 continue;
926 if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i))
927 return invalfc(fc, "Disabled controller
'%s'",
928 param->key);
929 ctx->subsys_mask |= (1 << i);
930 return 0;
931 }
932 return cg_invalf(fc, "cgroup1: Unknown subsys name '%s'",
param->key);
933 }
934 if (opt < 0)
935 return opt;
936
937 switch (opt) {
938 case Opt_none:
939 /* Explicitly have no subsystems */
940 ctx->none = true;
941 break;
942 case Opt_all:
943 ctx->all_ss = true;
944 break;
945 case Opt_noprefix:
946 ctx->flags |= CGRP_ROOT_NOPREFIX;
947 break;
948 case Opt_clone_children:
949 ctx->cpuset_clone_children = true;
950 break;
951 case Opt_cpuset_v2_mode:
952 ctx->flags |= CGRP_ROOT_CPUSET_V2_MODE;
953 break;
954 case Opt_xattr:
955 ctx->flags |= CGRP_ROOT_XATTR;
956 break;
957 case Opt_release_agent:
958 /* Specifying two release agents is forbidden */
959 if (ctx->release_agent)
960 return cg_invalf(fc, "cgroup1: release_agent respecified");
961 ctx->release_agent = param->string;
962 param->string = NULL;
963 break;
964 case Opt_name:
965 /* blocked by boot param? */
966 if (cgroup_no_v1_named)
967 return -ENOENT;
968 /* Can't specify an empty name */
969 if (!param->size)
970 return cg_invalf(fc, "cgroup1: Empty name");
971 if (param->size > MAX_CGROUP_ROOT_NAMELEN - 1)
972 return cg_invalf(fc, "cgroup1: Name too long");
973 /* Must match [\w.-]+ */
974 for (i = 0; i < param->size; i++) {
975 char c = param->string[i];
976 if (isalnum(c))
977 continue;
978 if ((c == '.') || (c == '-') || (c == '_'))
979 continue;
980 return cg_invalf(fc, "cgroup1: Invalid name");
981 }
982 /* Specifying two names is forbidden */
983 if (ctx->name)
984 return cg_invalf(fc, "cgroup1: name respecified");
985 ctx->name = param->string;
986 param->string = NULL;
987 break;
988 }
989 return 0;
990 }
991
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org