From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7046852022580092793==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v1 1/2] xfrm: Check if_id in xfrm_migrate Date: Thu, 06 Jan 2022 20:22:09 +0800 Message-ID: <202201062019.VFveWcCu-lkp@intel.com> In-Reply-To: <20220106005251.2833941-2-evitayan@google.com> List-Id: --===============7046852022580092793== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Yan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 18343b80691560f41c3339119a2e9314d4672c77] url: https://github.com/0day-ci/linux/commits/Yan-Yan/Fix-issues-in-xfrm= _migrate/20220106-085707 base: 18343b80691560f41c3339119a2e9314d4672c77 config: arc-randconfig-r032-20220106 (https://download.01.org/0day-ci/archi= ve/20220106/202201062019.VFveWcCu-lkp(a)intel.com/config) compiler: arceb-elf-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/2be451f5a66efd5951102e188= daee7c730f55dc7 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Yan-Yan/Fix-issues-in-xfrm_migrate= /20220106-085707 git checkout 2be451f5a66efd5951102e188daee7c730f55dc7 # 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=3Darc SHELL=3D/bin/bash net/xfrm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): net/xfrm/xfrm_policy.c: In function 'xfrm_migrate': >> net/xfrm/xfrm_policy.c:4403:21: warning: suggest parentheses around assi= gnment used as truth value [-Wparentheses] 4403 | if (x =3D xfrm_migrate_state_find(mp, net, if_id= )) { | ^ vim +4403 net/xfrm/xfrm_policy.c 4373 = 4374 int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, 4375 struct xfrm_migrate *m, int num_migrate, 4376 struct xfrm_kmaddress *k, struct net *net, 4377 struct xfrm_encap_tmpl *encap, u32 if_id) 4378 { 4379 int i, err, nx_cur =3D 0, nx_new =3D 0; 4380 struct xfrm_policy *pol =3D NULL; 4381 struct xfrm_state *x, *xc; 4382 struct xfrm_state *x_cur[XFRM_MAX_DEPTH]; 4383 struct xfrm_state *x_new[XFRM_MAX_DEPTH]; 4384 struct xfrm_migrate *mp; 4385 = 4386 /* Stage 0 - sanity checks */ 4387 if ((err =3D xfrm_migrate_check(m, num_migrate)) < 0) 4388 goto out; 4389 = 4390 if (dir >=3D XFRM_POLICY_MAX) { 4391 err =3D -EINVAL; 4392 goto out; 4393 } 4394 = 4395 /* Stage 1 - find policy */ 4396 if ((pol =3D xfrm_migrate_policy_find(sel, dir, type, net, if_id)) = =3D=3D NULL) { 4397 err =3D -ENOENT; 4398 goto out; 4399 } 4400 = 4401 /* Stage 2 - find and update state(s) */ 4402 for (i =3D 0, mp =3D m; i < num_migrate; i++, mp++) { > 4403 if (x =3D xfrm_migrate_state_find(mp, net, if_id)) { --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7046852022580092793==--