From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Andrey Konovalov <andreyknvl@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Alexey Gladkov <legion@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@Oracle.com>,
Jens Axboe <axboe@kernel.dk>,
David Hildenbrand <david@redhat.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] mm: remove unnecessary check in alloc_thread_stack_node()
Date: Tue, 1 Mar 2022 11:07:06 +0300 [thread overview]
Message-ID: <20220301080706.GB17208@kili> (raw)
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
next reply other threads:[~2022-03-01 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 8:07 Dan Carpenter [this message]
2022-03-01 8:26 ` [PATCH] mm: remove unnecessary check in alloc_thread_stack_node() Sebastian Andrzej Siewior
2022-03-01 8:45 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220301080706.GB17208@kili \
--to=dan.carpenter@oracle.com \
--cc=Liam.Howlett@Oracle.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=axboe@kernel.dk \
--cc=bigeasy@linutronix.de \
--cc=david@redhat.com \
--cc=ebiederm@xmission.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox