mm: remove unnecessary check in alloc_thread_stack_node()
Subsystems (4)
PATCH 1/1 mm: remove unnecessary check in alloc_thread_stack_node()
The "stack" pointer cannot be NULL at this point so there is no need to check.
Signed-off-by Dan Carpenter <[email protected]>
--- kernel/fork.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/fork.c +1 -2
@@ -327,8 +327,7 @@ static int alloc_thread_stack_node(struct task_struct *tsk, int node)* so cache the vm_struct. */ tsk->stack_vm_area = vm; -if (stack) - stack =kasan_reset_tag (stack); + stack =kasan_reset_tag (stack); tsk->stack = stack;return 0 ; }
Signature · 1 line
2.20.1
Quoted 4 lines · Dan Carpenter
The "stack" pointer cannot be NULL at this point so there is no need to check.
Signed-off-by Dan Carpenter <[email protected]>
Which tree is this against? Could you try against -tip, please?
Sebastian
Quoted 7 lines · Sebastian Andrzej Siewior
Quoted 4 lines · Dan Carpenter
The "stack" pointer cannot be NULL at this point so there is no need to check.
Signed-off-by Dan Carpenter <[email protected]>Which tree is this against? Could you try against -tip, please?
This was against linux-next. The patch needs to go through Andrew's tree, not through -tip.
I should have included a fixes tag so Andrew will know which patch to fold with.
Fixes dbcd55bd6681 ("kasan, fork: reset pointer tags of vmapped stacks")
regards,
dan carpenter