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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 24 Apr 2018 13:29:19 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Edward Cree <ecree@...arflare.com>
Cc:     kbuild-all@...org, linux-net-drivers@...arflare.com,
        David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] sfc: ARFS filter IDs

Hi Edward,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Edward-Cree/sfc-ARFS-filter-IDs/20180424-080737
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/sfc/farch.c: In function 'efx_farch_filter_rfs_expire_one':
>> drivers/net/ethernet/sfc/farch.c:2938:7: warning: 'rule' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (rule)
          ^

coccinelle warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/sfc/efx.c:3032:1-20: alloc with no test, possible model on line 3041
   drivers/net/ethernet/sfc/efx.c:3032:1-20: alloc with no test, possible model on line 3062

vim +/rule +2938 drivers/net/ethernet/sfc/farch.c

  2902	
  2903	bool efx_farch_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id,
  2904					     unsigned int index)
  2905	{
  2906		struct efx_farch_filter_state *state = efx->filter_state;
  2907		struct efx_farch_filter_table *table;
  2908		bool ret = false, force = false;
  2909		u16 arfs_id;
  2910	
  2911		down_write(&state->lock);
  2912		spin_lock_bh(&efx->rps_hash_lock);
  2913		table = &state->table[EFX_FARCH_FILTER_TABLE_RX_IP];
  2914		if (test_bit(index, table->used_bitmap) &&
  2915		    table->spec[index].priority == EFX_FILTER_PRI_HINT) {
  2916			struct efx_filter_spec spec;
  2917			struct efx_arfs_rule *rule;
  2918	
  2919			efx_farch_filter_to_gen_spec(&spec, &table->spec[index]);
  2920			if (!efx->rps_hash_table) {
  2921				/* In the absence of the table, we always returned 0 to
  2922				 * ARFS, so use the same to query it.
  2923				 */
  2924				arfs_id = 0;
  2925			} else {
  2926				rule = efx_rps_hash_find(efx, &spec);
  2927				if (!rule) {
  2928					/* ARFS table doesn't know of this filter, remove it */
  2929					force = true;
  2930				} else {
  2931					arfs_id = rule->arfs_id;
  2932					if (!efx_rps_check_rule(rule, index, &force))
  2933						goto out_unlock;
  2934				}
  2935			}
  2936			if (force || rps_may_expire_flow(efx->net_dev, spec.dmaq_id,
  2937							 flow_id, arfs_id)) {
> 2938				if (rule)
  2939					rule->filter_id = EFX_ARFS_FILTER_ID_REMOVING;
  2940				efx_rps_hash_del(efx, &spec);
  2941				efx_farch_filter_table_clear_entry(efx, table, index);
  2942				ret = true;
  2943			}
  2944		}
  2945	out_unlock:
  2946		spin_unlock_bh(&efx->rps_hash_lock);
  2947		up_write(&state->lock);
  2948		return ret;
  2949	}
  2950	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (62891 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ