linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"jlayton@kernel.org" <jlayton@kernel.org>
Subject: Re: [PATCH 1/2] SUNRPC: Don't allow waiting for exiting tasks
Date: Fri, 28 Mar 2025 18:00:52 +0000	[thread overview]
Message-ID: <653869b6e69d65b0314e133b901d670968d7b345.camel@hammerspace.com> (raw)
In-Reply-To: <26602925a3b7623c17c58cc9d5adeddde95e70d6.camel@kernel.org>

On Fri, 2025-03-28 at 13:53 -0400, Jeff Layton wrote:
> On Fri, 2025-03-28 at 13:40 -0400, trondmy@kernel.org wrote:
> > From: Trond Myklebust <trond.myklebust@hammerspace.com>
> > 
> > Once a task calls exit_signals() it can no longer be signalled. So
> > do
> > not allow it to do killable waits.
> > 
> > Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> > ---
> >  net/sunrpc/sched.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
> > index 9b45fbdc90ca..73bc39281ef5 100644
> > --- a/net/sunrpc/sched.c
> > +++ b/net/sunrpc/sched.c
> > @@ -276,6 +276,8 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);
> >  
> >  static int rpc_wait_bit_killable(struct wait_bit_key *key, int
> > mode)
> >  {
> > +	if (unlikely(current->flags & PF_EXITING))
> > +		return -EINTR;
> >  	schedule();
> >  	if (signal_pending_state(mode, current))
> >  		return -ERESTARTSYS;
> 
> Won't this mean that if a task is signalled and does a final fput,
> that
> a CLOSE sent in task_work will never get sent?

It should mean that the close gets sent, but the task won't wait for
completion.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2025-03-28 18:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28 17:40 [PATCH 1/2] SUNRPC: Don't allow waiting for exiting tasks trondmy
2025-03-28 17:40 ` [PATCH 2/2] NFS: " trondmy
2025-03-28 18:23   ` Jeff Layton
2025-03-28 17:53 ` [PATCH 1/2] SUNRPC: " Jeff Layton
2025-03-28 18:00   ` Trond Myklebust [this message]
2025-03-28 18:09     ` Jeff Layton
2025-03-28 19:36       ` Trond Myklebust
2025-04-08 10:31 ` Mark Brown
2025-07-23  7:02   ` Harshvardhan Jha
2025-07-23  8:07     ` NeilBrown
2025-07-25 11:59       ` Harshvardhan Jha
2025-07-27  4:50         ` NeilBrown
2025-07-28  8:07           ` Harshvardhan Jha
2025-07-28  9:34             ` NeilBrown
2025-08-04  7:45               ` Harshvardhan Jha
2025-08-06  5:47                 ` Harshvardhan Jha
2025-08-19 10:06                   ` Harshvardhan Jha

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=653869b6e69d65b0314e133b901d670968d7b345.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).