Content-Type: multipart/mixed; boundary="===============5893736947409318571==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH RFC bpf-next v2 4/5] bpf: Pin cgroup_view Date: Wed, 02 Feb 2022 12:20:47 +0800 Message-ID: <202202021257.qiKh7nky-lkp@intel.com> In-Reply-To: <20220201205534.1962784-5-haoluo@google.com> List-Id: --===============5893736947409318571== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Hao, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Hao-Luo/Extend-cgroup-inte= rface-with-bpf/20220202-045743 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git ma= ster config: m68k-defconfig (https://download.01.org/0day-ci/archive/20220202/20= 2202021257.qiKh7nky-lkp(a)intel.com/config) compiler: m68k-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/5ecb726d4b2336b6c49a58f01= 3fe270f2c3dfdd1 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Hao-Luo/Extend-cgroup-interface-wi= th-bpf/20220202-045743 git checkout 5ecb726d4b2336b6c49a58f013fe270f2c3dfdd1 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dm68k SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/bpf/inode.c: In function 'bpf_inherit_object': >> kernel/bpf/inode.c:638:32: error: 'cgrp_dfl_root' undeclared (first use = in this function) 638 | tag->private =3D cgrp_dfl_root.kf_root->kn; | ^~~~~~~~~~~~~ kernel/bpf/inode.c:638:32: note: each undeclared identifier is reported = only once for each function it appears in vim +/cgrp_dfl_root +638 kernel/bpf/inode.c 600 = 601 /* bpf_inherit_object - register an object in a diretory tag's inher= it list 602 * @dentry: dentry of the location to pin 603 * @mode: mode of created file entry 604 * @obj: bpf object 605 * @type: type of bpf object 606 * 607 * Could be called from bpf_obj_do_pin() or from mkdir(). 608 */ 609 static int bpf_inherit_object(struct dentry *dentry, umode_t mode, 610 void *obj, enum bpf_type type) 611 { 612 struct inode *dir =3D d_inode(dentry->d_parent); 613 struct obj_list *inherits; 614 struct bpf_inherit_entry *e; 615 struct bpf_dir_tag *tag; 616 const char *name; 617 bool queued =3D false, new_tag =3D false; 618 = 619 /* allocate bpf_dir_tag */ 620 tag =3D inode_tag(dir); 621 if (!tag) { 622 new_tag =3D true; 623 tag =3D kzalloc(sizeof(struct bpf_dir_tag), GFP_KERNEL); 624 if (unlikely(!tag)) 625 return -ENOMEM; 626 = 627 tag->type =3D BPF_DIR_KERNFS_REP; 628 inherits =3D kzalloc(sizeof(struct obj_list), GFP_KERNEL); 629 if (unlikely(!inherits)) { 630 kfree(tag); 631 return -ENOMEM; 632 } 633 = 634 kref_init(&inherits->refcnt); 635 INIT_LIST_HEAD(&inherits->list); 636 tag->inherit_objects =3D inherits; 637 /* initial tag points to the default root cgroup. */ > 638 tag->private =3D cgrp_dfl_root.kf_root->kn; 639 dir->i_private =3D tag; 640 } else { 641 inherits =3D tag->inherit_objects; 642 } 643 = 644 list_for_each_entry_rcu(e, &inherits->list, list) { 645 if (!strcmp(dentry->d_name.name, e->name.name)) { 646 queued =3D true; 647 break; 648 } 649 } 650 = 651 /* queue in tag's inherit_list. */ 652 if (!queued) { 653 e =3D kzalloc(sizeof(struct bpf_inherit_entry), GFP_KERNEL); 654 if (!e) { 655 if (new_tag) { 656 kfree(tag); 657 kfree(inherits); 658 } 659 return -ENOMEM; 660 } 661 = 662 INIT_LIST_HEAD(&e->list); 663 e->mode =3D mode; 664 e->obj =3D obj; 665 e->type =3D type; 666 name =3D kstrdup(dentry->d_name.name, GFP_USER | __GFP_NOWARN); 667 e->name =3D (struct qstr)QSTR_INIT(name, strlen(name)); 668 list_add_rcu(&e->list, &inherits->list); 669 } 670 return 0; 671 } 672 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5893736947409318571==--