]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
SUNRPC: Ensure the RPC client only quits on fatal signals
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 17 Jun 2011 14:14:59 +0000 (10:14 -0400)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:58 +0000 (13:54 -0700)
commit 5afa9133cfe67f1bfead6049a9640c9262a7101c upstream.

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

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/clnt.c

index 5359f36f6b41e77d25910924bd8792d679958161..c6fda093afb4d7e20dd80aa2c7673ce278c7536e 100644 (file)
@@ -575,13 +575,13 @@ retry:
        }
        inode = &gss_msg->inode->vfs_inode;
        for (;;) {
-               prepare_to_wait(&gss_msg->waitqueue, &wait, TASK_INTERRUPTIBLE);
+               prepare_to_wait(&gss_msg->waitqueue, &wait, TASK_KILLABLE);
                spin_lock(&inode->i_lock);
                if (gss_msg->ctx != NULL || gss_msg->msg.errno < 0) {
                        break;
                }
                spin_unlock(&inode->i_lock);
-               if (signalled()) {
+               if (fatal_signal_pending(current)) {
                        err = -ERESTARTSYS;
                        goto out_intr;
                }
index 756fc324db9ec5dc37870c8f0a2c1e6b2f4d2573..5018acd241375d2d7d997d2c71de1cd7a6f9fa7a 100644 (file)
@@ -928,7 +928,7 @@ call_allocate(struct rpc_task *task)
 
        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;
                rpc_delay(task, HZ>>4);
                return;