public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Steve French <stfrench@microsoft.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: fs/smb/client/connect.c:2614:6-25: WARNING: atomic_dec_and_test variation before object free at line 2622.
Date: Sat, 30 Nov 2024 21:43:55 +0800	[thread overview]
Message-ID: <202411302131.YXhblRGy-lkp@intel.com> (raw)

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@intel.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@redhat.com>
:::::: CC: Steve French <sfrench@us.ibm.com>

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

                 reply	other threads:[~2024-11-30 13:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411302131.YXhblRGy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stfrench@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox