So the return value is at end of the function.

No change of compiled x86-64 object.

Signed-off-by: Joe Perches <j...@perches.com>
---
 kernel/signal.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 9b133eb..739d261 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1345,21 +1345,21 @@ int kill_pid_info(int sig, struct siginfo *info, struct 
pid *pid)
        int error = -ESRCH;
        struct task_struct *p;
 
-       for (;;) {
+       do {
                rcu_read_lock();
                p = pid_task(pid, PIDTYPE_PID);
                if (p)
                        error = group_send_sig_info(sig, info, p);
                rcu_read_unlock();
-               if (likely(!p || error != -ESRCH))
-                       return error;
 
                /*
-                * The task was unhashed in between, try again.  If it
-                * is dead, pid_task() will return NULL, if we race with
-                * de_thread() it will find the new leader.
+                * If the task is dead, pid_task() will return NULL
+                * If we race with de_thread() it will find the new leader.
+                * The task was unhashed in between, try again.
                 */
-       }
+       } while (unlikely(p && error == -ESRCH));
+
+       return error;
 }
 
 int kill_proc_info(int sig, struct siginfo *info, pid_t pid)
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to