Skip to content

Commit 14e41b1

Browse files
author
Trond Myklebust
committed
SUNRPC: Don't allow waiting for exiting tasks
Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 0af5fb5 commit 14e41b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/sunrpc/sched.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);
276276

277277
static int rpc_wait_bit_killable(struct wait_bit_key *key, int mode)
278278
{
279+
if (unlikely(current->flags & PF_EXITING))
280+
return -EINTR;
279281
schedule();
280282
if (signal_pending_state(mode, current))
281283
return -ERESTARTSYS;

0 commit comments

Comments
 (0)