Hi Xin,

url:    
https://github.com/0day-ci/linux/commits/Xin-Long/xfrm-state-match-with-both-mark-and-mask-on-user-interfaces/20200630-141906
base:   https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git 
master
config: arm-randconfig-m031-20200701 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>

smatch warnings:
net/xfrm/xfrm_state.c:1760 xfrm_state_lookup_user() warn: ignoring unreachable 
code.

# 
https://github.com/0day-ci/linux/commit/ef34e2d07ba51ae7e0ff334958449318e025e6b6
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout ef34e2d07ba51ae7e0ff334958449318e025e6b6
vim +1760 net/xfrm/xfrm_state.c

ef34e2d07ba51ae Xin Long       2020-06-30  1751  struct xfrm_state *
ef34e2d07ba51ae Xin Long       2020-06-30  1752  xfrm_state_lookup_user(struct 
net *net, const struct xfrm_mark *mark,
ef34e2d07ba51ae Xin Long       2020-06-30  1753                        const 
xfrm_address_t *daddr, __be32 spi,
ef34e2d07ba51ae Xin Long       2020-06-30  1754                        u8 
proto, unsigned short family)
ef34e2d07ba51ae Xin Long       2020-06-30  1755  {
ef34e2d07ba51ae Xin Long       2020-06-30  1756         struct xfrm_state *x;
ef34e2d07ba51ae Xin Long       2020-06-30  1757  
ef34e2d07ba51ae Xin Long       2020-06-30  1758         rcu_read_lock();
ef34e2d07ba51ae Xin Long       2020-06-30  1759         return 
__xfrm_state_lookup(net, 0, mark, daddr, spi, proto, family);
                                                        ^^^^^^^
Should be "x = __xfrm_state_lookup();"

ef34e2d07ba51ae Xin Long       2020-06-30 @1760         rcu_read_unlock();
ef34e2d07ba51ae Xin Long       2020-06-30  1761         return x;
ef34e2d07ba51ae Xin Long       2020-06-30  1762  }
ef34e2d07ba51ae Xin Long       2020-06-30  1763  
EXPORT_SYMBOL(xfrm_state_lookup_user);

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

Attachment: .config.gz
Description: application/gzip

Reply via email to