process.c (a4261d4bb45022e1b8b95df13dbb05abac490165) process.c (714acdbd1c94e7e3ab90f6b6938f1ccb27b662f0)
1// SPDX-License-Identifier: GPL-2.0
2
3/*
4 * This file handles the architecture independent parts of process handling..
5 */
6
7#include <linux/compat.h>
8#include <linux/errno.h>

--- 14 unchanged lines hidden (view full) ---

23 .exit_signal = SIGCHLD,
24 /* Reuse the parent's stack for the child. */
25 .stack = regs->u_regs[UREG_FP],
26 };
27
28 ret = _do_fork(&args);
29
30 /* If we get an error and potentially restart the system
1// SPDX-License-Identifier: GPL-2.0
2
3/*
4 * This file handles the architecture independent parts of process handling..
5 */
6
7#include <linux/compat.h>
8#include <linux/errno.h>

--- 14 unchanged lines hidden (view full) ---

23 .exit_signal = SIGCHLD,
24 /* Reuse the parent's stack for the child. */
25 .stack = regs->u_regs[UREG_FP],
26 };
27
28 ret = _do_fork(&args);
29
30 /* If we get an error and potentially restart the system
31 * call, we're screwed because copy_thread_tls() clobbered
31 * call, we're screwed because copy_thread() clobbered
32 * the parent's %o1. So detect that case and restore it
33 * here.
34 */
35 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
36 regs->u_regs[UREG_I1] = orig_i1;
37
38 return ret;
39}

--- 8 unchanged lines hidden (view full) ---

48 .exit_signal = SIGCHLD,
49 /* Reuse the parent's stack for the child. */
50 .stack = regs->u_regs[UREG_FP],
51 };
52
53 ret = _do_fork(&args);
54
55 /* If we get an error and potentially restart the system
32 * the parent's %o1. So detect that case and restore it
33 * here.
34 */
35 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
36 regs->u_regs[UREG_I1] = orig_i1;
37
38 return ret;
39}

--- 8 unchanged lines hidden (view full) ---

48 .exit_signal = SIGCHLD,
49 /* Reuse the parent's stack for the child. */
50 .stack = regs->u_regs[UREG_FP],
51 };
52
53 ret = _do_fork(&args);
54
55 /* If we get an error and potentially restart the system
56 * call, we're screwed because copy_thread_tls() clobbered
56 * call, we're screwed because copy_thread() clobbered
57 * the parent's %o1. So detect that case and restore it
58 * here.
59 */
60 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
61 regs->u_regs[UREG_I1] = orig_i1;
62
63 return ret;
64}

--- 29 unchanged lines hidden (view full) ---

94 if (regs->u_regs[UREG_I1])
95 args.stack = regs->u_regs[UREG_I1];
96 else
97 args.stack = regs->u_regs[UREG_FP];
98
99 ret = _do_fork(&args);
100
101 /* If we get an error and potentially restart the system
57 * the parent's %o1. So detect that case and restore it
58 * here.
59 */
60 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
61 regs->u_regs[UREG_I1] = orig_i1;
62
63 return ret;
64}

--- 29 unchanged lines hidden (view full) ---

94 if (regs->u_regs[UREG_I1])
95 args.stack = regs->u_regs[UREG_I1];
96 else
97 args.stack = regs->u_regs[UREG_FP];
98
99 ret = _do_fork(&args);
100
101 /* If we get an error and potentially restart the system
102 * call, we're screwed because copy_thread_tls() clobbered
102 * call, we're screwed because copy_thread() clobbered
103 * the parent's %o1. So detect that case and restore it
104 * here.
105 */
106 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
107 regs->u_regs[UREG_I1] = orig_i1;
108
109 return ret;
110}
103 * the parent's %o1. So detect that case and restore it
104 * here.
105 */
106 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
107 regs->u_regs[UREG_I1] = orig_i1;
108
109 return ret;
110}