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>] [day] [month] [year] [list]
Message-ID: <202411302131.YXhblRGy-lkp@intel.com>
Date: Sat, 30 Nov 2024 21:43:55 +0800
From: kernel test robot <lkp@...el.com>
To: Steve French <stfrench@...rosoft.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: fs/smb/client/connect.c:2614:6-25: WARNING: atomic_dec_and_test
 variation before object free at line 2622.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2ba9f676d0a2e408aef14d679984c26373bf37b7
commit: 38c8a9a52082579090e34c033d439ed2cd1a462d smb: move client and server files to common directory fs/smb
date:   1 year, 6 months ago
config: i386-randconfig-051-20241118 (https://download.01.org/0day-ci/archive/20241130/202411302131.YXhblRGy-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411302131.YXhblRGy-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/smb/client/connect.c:2614:6-25: WARNING: atomic_dec_and_test variation before object free at line 2622.

vim +2614 fs/smb/client/connect.c

d00c28de55a69d fs/cifs/connect.c Jeff Layton 2010-04-24  2607  
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2608  void
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2609  cifs_put_tlink(struct tcon_link *tlink)
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2610  {
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2611  	if (!tlink || IS_ERR(tlink))
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2612  		return;
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2613  
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06 @2614  	if (!atomic_dec_and_test(&tlink->tl_count) ||
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2615  	    test_bit(TCON_LINK_IN_TREE, &tlink->tl_flags)) {
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2616  		tlink->tl_time = jiffies;
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2617  		return;
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2618  	}
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2619  
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2620  	if (!IS_ERR(tlink_tcon(tlink)))
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2621  		cifs_put_tcon(tlink_tcon(tlink));
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06 @2622  	kfree(tlink);
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2623  	return;
9d002df492b14c fs/cifs/connect.c Jeff Layton 2010-10-06  2624  }
d00c28de55a69d fs/cifs/connect.c Jeff Layton 2010-04-24  2625  

:::::: The code at line 2614 was first introduced by commit
:::::: 9d002df492b14c690425d9785530371b6c1ccbca cifs: add routines to build sessions and tcons on the fly

:::::: TO: Jeff Layton <jlayton@...hat.com>
:::::: CC: Steve French <sfrench@...ibm.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ