Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Michael Bommarito <michael.bommarito@gmail.com>
Cc: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
		linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] NFSD: restart ssc_expire_umount walk after dropping nfsd_ssc_lock
Date: Sat, 23 May 2026 07:10:16 -0400	[thread overview]
Message-ID: <4d035995bef0f035eae2b613ed09f02f9920d18a.camel@kernel.org> (raw)
In-Reply-To: <CAJJ9bXxc1C2coYCkxWYSk-ojq=XatuA_rje3NCA-s3e=NHhbpQ@mail.gmail.com>

On Sat, 2026-05-23 at 07:02 -0400, Michael Bommarito wrote:
> On Sat, May 23, 2026 at 6:55 AM Jeff Layton <jlayton@kernel.org> wrote:
> > Comment is a bit confusing, given that you replaced
> > list_for_each_entry_safe() with list_for_each_entry().
> 
> Sorry, that's left over from an earlier patch attempt that introduced
> a different issue.  How would this comment look?
> 
> Concurrent nfsd4_ssc_cancel_dul() can free an item while spinlock is
> dropped for mntput() above, so restart the walk from the head so no
> stale pointer is followed.


Sure, looks good. FWIW, the "restart the loop after dropping the lock"
pattern is pretty common across the kernel, but it is good to lay out
the rationale in a comment.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-05-23 11:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23  1:41 [PATCH] NFSD: restart ssc_expire_umount walk after dropping nfsd_ssc_lock Michael Bommarito
2026-05-23 10:55 ` Jeff Layton
2026-05-23 11:02   ` Michael Bommarito
2026-05-23 11:10     ` Jeff Layton [this message]
2026-05-23 15:18 ` Chuck Lever

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=4d035995bef0f035eae2b613ed09f02f9920d18a.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=michael.bommarito@gmail.com \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.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