public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stanislav Fomichev <sdf@google.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org,
	Stanislav Fomichev <sdf@google.com>
Subject: Re: [PATCH bpf-next v8 03/11] bpf: per-cgroup lsm flavor
Date: Thu, 2 Jun 2022 14:16:54 +0800	[thread overview]
Message-ID: <202206021403.M9hFZdbY-lkp@intel.com> (raw)
In-Reply-To: <20220601190218.2494963-4-sdf@google.com>

Hi Stanislav,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Stanislav-Fomichev/bpf-cgroup_sock-lsm-flavor/20220602-050600
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220602/202206021403.M9hFZdbY-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b364c76683f8ef241025a9556300778c07b590c2)
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://github.com/intel-lab-lkp/linux/commit/584b25fdd30894c312d577f4b6b83f93d64e464b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Stanislav-Fomichev/bpf-cgroup_sock-lsm-flavor/20220602-050600
        git checkout 584b25fdd30894c312d577f4b6b83f93d64e464b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/

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

All warnings (new ones prefixed by >>):

>> kernel/bpf/cgroup.c:257:35: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]
                                   if (atype >= CGROUP_LSM_START && atype <= CGROUP_LSM_END)
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/cgroup.c:252:35: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]
                                   if (atype >= CGROUP_LSM_START && atype <= CGROUP_LSM_END)
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   2 warnings generated.


vim +257 kernel/bpf/cgroup.c

   226	
   227	/**
   228	 * cgroup_bpf_release() - put references of all bpf programs and
   229	 *                        release all cgroup bpf data
   230	 * @work: work structure embedded into the cgroup to modify
   231	 */
   232	static void cgroup_bpf_release(struct work_struct *work)
   233	{
   234		struct cgroup *p, *cgrp = container_of(work, struct cgroup,
   235						       bpf.release_work);
   236		struct bpf_prog_array *old_array;
   237		struct list_head *storages = &cgrp->bpf.storages;
   238		struct bpf_cgroup_storage *storage, *stmp;
   239	
   240		unsigned int atype;
   241	
   242		mutex_lock(&cgroup_mutex);
   243	
   244		for (atype = 0; atype < ARRAY_SIZE(cgrp->bpf.progs); atype++) {
   245			struct hlist_head *progs = &cgrp->bpf.progs[atype];
   246			struct bpf_prog_list *pl;
   247			struct hlist_node *pltmp;
   248	
   249			hlist_for_each_entry_safe(pl, pltmp, progs, node) {
   250				hlist_del(&pl->node);
   251				if (pl->prog) {
   252					if (atype >= CGROUP_LSM_START && atype <= CGROUP_LSM_END)
   253						bpf_trampoline_unlink_cgroup_shim(pl->prog);
   254					bpf_prog_put(pl->prog);
   255				}
   256				if (pl->link) {
 > 257					if (atype >= CGROUP_LSM_START && atype <= CGROUP_LSM_END)
   258						bpf_trampoline_unlink_cgroup_shim(pl->link->link.prog);
   259					bpf_cgroup_link_auto_detach(pl->link);
   260				}
   261				kfree(pl);
   262				static_branch_dec(&cgroup_bpf_enabled_key[atype]);
   263			}
   264			old_array = rcu_dereference_protected(
   265					cgrp->bpf.effective[atype],
   266					lockdep_is_held(&cgroup_mutex));
   267			bpf_prog_array_free(old_array);
   268		}
   269	
   270		list_for_each_entry_safe(storage, stmp, storages, list_cg) {
   271			bpf_cgroup_storage_unlink(storage);
   272			bpf_cgroup_storage_free(storage);
   273		}
   274	
   275		mutex_unlock(&cgroup_mutex);
   276	
   277		for (p = cgroup_parent(cgrp); p; p = cgroup_parent(p))
   278			cgroup_bpf_put(p);
   279	
   280		percpu_ref_exit(&cgrp->bpf.refcnt);
   281		cgroup_put(cgrp);
   282	}
   283	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

       reply	other threads:[~2022-06-02  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220601190218.2494963-4-sdf@google.com>
2022-06-02  6:16 ` kernel test robot [this message]
2022-06-02 16:49   ` [PATCH bpf-next v8 03/11] bpf: per-cgroup lsm flavor Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206021403.M9hFZdbY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox