lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211201022202.GB38461@linux.alibaba.com>
Date:   Wed, 1 Dec 2021 10:22:02 +0800
From:   "dust.li" <dust.li@...ux.alibaba.com>
To:     kernel test robot <lkp@...el.com>,
        Karsten Graul <kgraul@...ux.ibm.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Ursula Braun <ubraun@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, Tony Lu <tonylu@...ux.alibaba.com>,
        Wen Gu <guwen@...ux.alibaba.com>, linux-s390@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net] net/smc: fix wrong list_del in smc_lgr_cleanup_early

On Wed, Dec 01, 2021 at 02:07:46AM +0800, kernel test robot wrote:
>Hi Dust,
>
>Thank you for the patch! Perhaps something to improve:
>
>[auto build test WARNING on net/master]
>
>url:    https://github.com/0day-ci/linux/commits/Dust-Li/net-smc-fix-wrong-list_del-in-smc_lgr_cleanup_early/20211130-232151
>base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 34d8778a943761121f391b7921f79a7adbe1feaf
>config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20211201/202112010159.e2LA9rIR-lkp@intel.com/config)
>compiler: arceb-elf-gcc (GCC) 11.2.0
>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/0day-ci/linux/commit/9b9af6a458f20989d91478dc8e038325978e16d5
>        git remote add linux-review https://github.com/0day-ci/linux
>        git fetch --no-tags linux-review Dust-Li/net-smc-fix-wrong-list_del-in-smc_lgr_cleanup_early/20211130-232151
>        git checkout 9b9af6a458f20989d91478dc8e038325978e16d5
>        # save the config file to linux build tree
>        mkdir build_dir
>        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash net/smc/
>
>If you fix the issue, kindly add following tag as appropriate
>Reported-by: kernel test robot <lkp@...el.com>
>
>All warnings (new ones prefixed by >>):
>
>   net/smc/smc_core.c: In function 'smc_lgr_cleanup_early':
>>> net/smc/smc_core.c:628:27: warning: variable 'lgr_list' set but not used [-Wunused-but-set-variable]
>     628 |         struct list_head *lgr_list;
>         |                           ^~~~~~~~
Sorry, I will send a v2 to fix this.

>
>
>vim +/lgr_list +628 net/smc/smc_core.c
>
>8f9dde4bf230f5 Guvenc Gulce  2020-12-01  624  
>51e3dfa8906ace Ursula Braun  2020-02-25  625  void smc_lgr_cleanup_early(struct smc_connection *conn)
>51e3dfa8906ace Ursula Braun  2020-02-25  626  {
>51e3dfa8906ace Ursula Braun  2020-02-25  627  	struct smc_link_group *lgr = conn->lgr;
>9ec6bf19ec8bb1 Karsten Graul 2020-05-03 @628  	struct list_head *lgr_list;
>9ec6bf19ec8bb1 Karsten Graul 2020-05-03  629  	spinlock_t *lgr_lock;
>51e3dfa8906ace Ursula Braun  2020-02-25  630  
>51e3dfa8906ace Ursula Braun  2020-02-25  631  	if (!lgr)
>51e3dfa8906ace Ursula Braun  2020-02-25  632  		return;
>51e3dfa8906ace Ursula Braun  2020-02-25  633  
>51e3dfa8906ace Ursula Braun  2020-02-25  634  	smc_conn_free(conn);
>9ec6bf19ec8bb1 Karsten Graul 2020-05-03  635  	lgr_list = smc_lgr_list_head(lgr, &lgr_lock);
>9ec6bf19ec8bb1 Karsten Graul 2020-05-03  636  	spin_lock_bh(lgr_lock);
>9ec6bf19ec8bb1 Karsten Graul 2020-05-03  637  	/* do not use this link group for new connections */
>9b9af6a458f209 Dust Li       2021-11-30  638  	if (!list_empty(&lgr->list))
>9b9af6a458f209 Dust Li       2021-11-30  639  		list_del_init(&lgr->list);
>9ec6bf19ec8bb1 Karsten Graul 2020-05-03  640  	spin_unlock_bh(lgr_lock);
>f9aab6f2ce5761 Ursula Braun  2020-09-10  641  	__smc_lgr_terminate(lgr, true);
>51e3dfa8906ace Ursula Braun  2020-02-25  642  }
>51e3dfa8906ace Ursula Braun  2020-02-25  643  
>
>---
>0-DAY CI Kernel Test Service, Intel Corporation
>https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ