fork: Using oldmm replace current->mm for dup_mm
Subsystems (3)
PATCH 1/1 fork: Using oldmm replace current->mm for dup_mm
In the current implementation of copy_mm(),there is a line initializes oldmm = current->mm before dup_mm.
This means that there is no longer a need to use current->mm for dup_mm.
Signed-off-by zhijun.han <[email protected]>
--- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/fork.c +1 -1
@@ -1720,7 +1720,7 @@ static int copy_mm(unsigned long clone_flags, struct task_struct *tsk)mmget (oldmm); mm = oldmm; }else { - mm =dup_mm (tsk, current->mm); + mm =dup_mm (tsk, oldmm);if (!mm)return -ENOMEM ; }
Signature · 1 line
2.45.2