All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [cel:nfsd-testing 47/288] fs/nfsd/nfs4state.c:6197 nfsd4_deleg_recall_rejected() warn: inconsistent returns '&clp->cl_lock'.
Date: Mon, 19 Oct 2026 21:26:11 +0200	[thread overview]
Message-ID: <202610192154.oZWxX8ca-lkp@intel.com> (raw)

Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Chuck Lever <cel@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-testing
head:   b4e06bef38843c8b909d0b4317dfaaf87dba6d72
commit: bbfa823f624d41e85ebca929ac77dc2182cadfed [47/288] NFSD: Destroy a recalled delegation the client does not hold
:::::: branch date: 26 hours ago
:::::: commit date: 2 weeks ago
config: i386-randconfig-2200-20261019 (https://download.01.org/0day-ci/archive/20261019/202610192154.oZWxX8ca-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202610192154.oZWxX8ca-lkp@intel.com/

New smatch warnings:
fs/nfsd/nfs4state.c:6197 nfsd4_deleg_recall_rejected() warn: inconsistent returns '&clp->cl_lock'.

Old smatch warnings:
fs/nfsd/nfs4state.c:9065 init_lock_stateid() warn: inconsistent returns '&stp->st_mutex'.

vim +6197 fs/nfsd/nfs4state.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  6174  
bbfa823f624d41 Chuck Lever    2026-08-02  6175  /*
bbfa823f624d41 Chuck Lever    2026-08-02  6176   * cl_lock orders this against a laundromat reaping @dp: either
bbfa823f624d41 Chuck Lever    2026-08-02  6177   * revoke_delegation() observes dl_recall_rejected and destroys @dp, or
bbfa823f624d41 Chuck Lever    2026-08-02  6178   * it reached cl_revoked first and @dp is released here instead.
bbfa823f624d41 Chuck Lever    2026-08-02  6179   */
bbfa823f624d41 Chuck Lever    2026-08-02  6180  static void nfsd4_deleg_recall_rejected(struct nfs4_delegation *dp)
bbfa823f624d41 Chuck Lever    2026-08-02  6181  {
bbfa823f624d41 Chuck Lever    2026-08-02  6182  	struct nfs4_client *clp = dp->dl_stid.sc_client;
bbfa823f624d41 Chuck Lever    2026-08-02  6183  
bbfa823f624d41 Chuck Lever    2026-08-02  6184  	spin_lock(&clp->cl_lock);
bbfa823f624d41 Chuck Lever    2026-08-02  6185  	if (dp->dl_stid.sc_status & (SC_STATUS_CLOSED | SC_STATUS_FREED |
bbfa823f624d41 Chuck Lever    2026-08-02  6186  				     SC_STATUS_ADMIN_REVOKED)) {
bbfa823f624d41 Chuck Lever    2026-08-02  6187  		spin_unlock(&clp->cl_lock);
bbfa823f624d41 Chuck Lever    2026-08-02  6188  		return;
bbfa823f624d41 Chuck Lever    2026-08-02  6189  	}
bbfa823f624d41 Chuck Lever    2026-08-02  6190  	if (dp->dl_stid.sc_status & SC_STATUS_FREEABLE) {
bbfa823f624d41 Chuck Lever    2026-08-02  6191  		dp->dl_stid.sc_status |= SC_STATUS_CLOSED;
bbfa823f624d41 Chuck Lever    2026-08-02  6192  		/* this function drops ->cl_lock */
bbfa823f624d41 Chuck Lever    2026-08-02  6193  		nfsd4_drop_revoked_stid(&dp->dl_stid);
bbfa823f624d41 Chuck Lever    2026-08-02  6194  		return;
bbfa823f624d41 Chuck Lever    2026-08-02  6195  	}
bbfa823f624d41 Chuck Lever    2026-08-02  6196  	dp->dl_recall_rejected = true;
bbfa823f624d41 Chuck Lever    2026-08-02 @6197  	spin_unlock(&clp->cl_lock);
bbfa823f624d41 Chuck Lever    2026-08-02  6198  }
bbfa823f624d41 Chuck Lever    2026-08-02  6199  

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

                 reply	other threads:[~2026-10-19 19:26 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=202610192154.oZWxX8ca-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.