From 9ca4a2d5339d9505bd9b4de98347440ca9f546ca Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 7 Sep 2010 19:37:06 -0700 Subject: [PATCH] --- yaml --- r: 210552 b: refs/heads/master c: 9aea5a65aa7a1af9a4236dfaeb0088f1624f9919 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/exec.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2905b3be34ec..7b235167be27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7993bc1f4663c0db67bb8f0d98e6678145b387cd +refs/heads/master: 9aea5a65aa7a1af9a4236dfaeb0088f1624f9919 diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index 6f2d777431a8..828dd2461d6b 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -376,6 +376,9 @@ static int count(const char __user * const __user * argv, int max) argv++; if (i++ >= max) return -E2BIG; + + if (fatal_signal_pending(current)) + return -ERESTARTNOHAND; cond_resched(); } } @@ -419,6 +422,10 @@ static int copy_strings(int argc, const char __user *const __user *argv, while (len > 0) { int offset, bytes_to_copy; + if (fatal_signal_pending(current)) { + ret = -ERESTARTNOHAND; + goto out; + } cond_resched(); offset = pos % PAGE_SIZE;