proc: fork: copy all registers on fork
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
0e8fd71d64
commit
89714dc593
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ pid_t sys_fork()
|
|||
*/
|
||||
struct pt_regs *parent_r = current_pt_regs();
|
||||
struct pt_regs *child_r = (struct pt_regs *)(ktop - sizeof(struct pt_regs));
|
||||
memcpy(child_r, parent_r, sizeof(struct pt_regs) - sizeof(u64));
|
||||
memcpy(child_r, parent_r, sizeof(struct pt_regs));
|
||||
child_r->rax = 0;
|
||||
child_r->rdx = parent_r->rsp;
|
||||
*(u64 *)(ktop - 8) = (u64)fork_trampoline;
|
||||
|
|
|
|||
Loading…
Reference in a new issue