Commit 5afa9133 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Ensure the RPC client only quits on fatal signals

Fix a couple of instances where we were exiting the RPC client on
arbitrary signals. We should only do so on fatal signals.

Cc: stable@kernel.org
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ee7b75fc
...@@ -577,13 +577,13 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) ...@@ -577,13 +577,13 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
} }
inode = &gss_msg->inode->vfs_inode; inode = &gss_msg->inode->vfs_inode;
for (;;) { for (;;) {
prepare_to_wait(&gss_msg->waitqueue, &wait, TASK_INTERRUPTIBLE); prepare_to_wait(&gss_msg->waitqueue, &wait, TASK_KILLABLE);
spin_lock(&inode->i_lock); spin_lock(&inode->i_lock);
if (gss_msg->ctx != NULL || gss_msg->msg.errno < 0) { if (gss_msg->ctx != NULL || gss_msg->msg.errno < 0) {
break; break;
} }
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
if (signalled()) { if (fatal_signal_pending(current)) {
err = -ERESTARTSYS; err = -ERESTARTSYS;
goto out_intr; goto out_intr;
} }
......
...@@ -1061,7 +1061,7 @@ call_allocate(struct rpc_task *task) ...@@ -1061,7 +1061,7 @@ call_allocate(struct rpc_task *task)
dprintk("RPC: %5u rpc_buffer allocation failed\n", task->tk_pid); dprintk("RPC: %5u rpc_buffer allocation failed\n", task->tk_pid);
if (RPC_IS_ASYNC(task) || !signalled()) { if (RPC_IS_ASYNC(task) || !fatal_signal_pending(current)) {
task->tk_action = call_allocate; task->tk_action = call_allocate;
rpc_delay(task, HZ>>4); rpc_delay(task, HZ>>4);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment