public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: remove unnecessary check in alloc_thread_stack_node()
@ 2022-03-01  8:07 Dan Carpenter
  2022-03-01  8:26 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2022-03-01  8:07 UTC (permalink / raw)
  To: Eric W. Biederman, Andrey Konovalov
  Cc: Andrew Morton, Thomas Gleixner, Peter Zijlstra, Andy Lutomirski,
	Sebastian Andrzej Siewior, Alexey Gladkov, Liam R. Howlett,
	Jens Axboe, David Hildenbrand, linux-kernel, kernel-janitors

The "stack" pointer cannot be NULL at this point so there is no
need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 kernel/fork.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 516f9db66640..5e7ca394b8e3 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -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;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: remove unnecessary check in alloc_thread_stack_node()
  2022-03-01  8:07 [PATCH] mm: remove unnecessary check in alloc_thread_stack_node() Dan Carpenter
@ 2022-03-01  8:26 ` Sebastian Andrzej Siewior
  2022-03-01  8:45   ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-01  8:26 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Eric W. Biederman, Andrey Konovalov, Andrew Morton,
	Thomas Gleixner, Peter Zijlstra, Andy Lutomirski, Alexey Gladkov,
	Liam R. Howlett, Jens Axboe, David Hildenbrand, linux-kernel,
	kernel-janitors

On 2022-03-01 11:07:06 [+0300], Dan Carpenter wrote:
> The "stack" pointer cannot be NULL at this point so there is no
> need to check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Which tree is this against? Could you try against -tip, please?

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: remove unnecessary check in alloc_thread_stack_node()
  2022-03-01  8:26 ` Sebastian Andrzej Siewior
@ 2022-03-01  8:45   ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-03-01  8:45 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, Andrew Morton, Andrey Konovalov
  Cc: Eric W. Biederman, Thomas Gleixner, Peter Zijlstra,
	Andy Lutomirski, Alexey Gladkov, Liam R. Howlett, Jens Axboe,
	David Hildenbrand, linux-kernel, kernel-janitors

On Tue, Mar 01, 2022 at 09:26:26AM +0100, Sebastian Andrzej Siewior wrote:
> On 2022-03-01 11:07:06 [+0300], Dan Carpenter wrote:
> > The "stack" pointer cannot be NULL at this point so there is no
> > need to check.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-01  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01  8:07 [PATCH] mm: remove unnecessary check in alloc_thread_stack_node() Dan Carpenter
2022-03-01  8:26 ` Sebastian Andrzej Siewior
2022-03-01  8:45   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox