mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/ethernet/broadcom/bnxt/bnxt.c:5333:6-25: WARNING: atomic_dec_and_test variation before object free at line 5336.
@ 2024-10-22 12:17 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-10-22 12:17 UTC (permalink / raw)
  To: Michael Chan
  Cc: oe-kbuild-all, linux-kernel, Vasundhara Volam, Andy Gospodarek,
	Pavan Chebbi, Simon Horman

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c2ee9f594da826bea183ed14f2cc029c719bf4da
commit: 1f6e77cb9b328f2ec145e73be97cab6fec838678 bnxt_en: Add bnxt_l2_filter hash table.
date:   10 months ago
config: arc-randconfig-r052-20241022 (https://download.01.org/0day-ci/archive/20241022/202410222004.wyOjgwYT-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410222004.wyOjgwYT-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:5333:6-25: WARNING: atomic_dec_and_test variation before object free at line 5336.

vim +5333 drivers/net/ethernet/broadcom/bnxt/bnxt.c

  5330	
  5331	void bnxt_del_l2_filter(struct bnxt *bp, struct bnxt_l2_filter *fltr)
  5332	{
> 5333		if (!atomic_dec_and_test(&fltr->refcnt))
  5334			return;
  5335		spin_lock_bh(&bp->ntp_fltr_lock);
> 5336		hlist_del_rcu(&fltr->base.hash);
  5337		if (fltr->base.flags) {
  5338			clear_bit(fltr->base.sw_id, bp->ntp_fltr_bmap);
  5339			bp->ntp_fltr_count--;
  5340		}
  5341		spin_unlock_bh(&bp->ntp_fltr_lock);
  5342		kfree_rcu(fltr, base.rcu);
  5343	}
  5344	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread
* drivers/net/ethernet/broadcom/bnxt/bnxt.c:5333:6-25: WARNING: atomic_dec_and_test variation before object free at line 5336.
@ 2024-12-11  3:37 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-12-11  3:37 UTC (permalink / raw)
  To: Michael Chan
  Cc: oe-kbuild-all, linux-kernel, Vasundhara Volam, Andy Gospodarek,
	Pavan Chebbi, Simon Horman

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7cb1b466315004af98f6ba6c2546bb713ca3c237
commit: 1f6e77cb9b328f2ec145e73be97cab6fec838678 bnxt_en: Add bnxt_l2_filter hash table.
date:   11 months ago
config: sparc64-randconfig-r061-20241210 (https://download.01.org/0day-ci/archive/20241211/202412111151.G84SK1aw-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412111151.G84SK1aw-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:5333:6-25: WARNING: atomic_dec_and_test variation before object free at line 5336.

vim +5333 drivers/net/ethernet/broadcom/bnxt/bnxt.c

  5330	
  5331	void bnxt_del_l2_filter(struct bnxt *bp, struct bnxt_l2_filter *fltr)
  5332	{
> 5333		if (!atomic_dec_and_test(&fltr->refcnt))
  5334			return;
  5335		spin_lock_bh(&bp->ntp_fltr_lock);
> 5336		hlist_del_rcu(&fltr->base.hash);
  5337		if (fltr->base.flags) {
  5338			clear_bit(fltr->base.sw_id, bp->ntp_fltr_bmap);
  5339			bp->ntp_fltr_count--;
  5340		}
  5341		spin_unlock_bh(&bp->ntp_fltr_lock);
  5342		kfree_rcu(fltr, base.rcu);
  5343	}
  5344	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-11  3:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-22 12:17 drivers/net/ethernet/broadcom/bnxt/bnxt.c:5333:6-25: WARNING: atomic_dec_and_test variation before object free at line 5336 kernel test robot
2024-12-11  3:37 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®