* [PATCH] remove the pointless BUG_ON(!task) from wake_up_q()
@ 2021-05-10 16:15 Oleg Nesterov
2021-05-12 9:23 ` [tip: sched/core] sched/core: Remove " tip-bot2 for Oleg Nesterov
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2021-05-10 16:15 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, linux-kernel
because it looks very confusing (to me at least). It is equivalent to
BUG_ON(node == offsetof(struct task_struct, wake_q)), unlikely this is
what we actually want to check.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 5226cc26a095..61d1d85bb93d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -585,7 +585,6 @@ void wake_up_q(struct wake_q_head *head)
struct task_struct *task;
task = container_of(node, struct task_struct, wake_q);
- BUG_ON(!task);
/* Task can safely be re-inserted now: */
node = node->next;
task->wake_q.next = NULL;
--
2.25.1.362.g51ebf55
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: sched/core] sched/core: Remove the pointless BUG_ON(!task) from wake_up_q()
2021-05-10 16:15 [PATCH] remove the pointless BUG_ON(!task) from wake_up_q() Oleg Nesterov
@ 2021-05-12 9:23 ` tip-bot2 for Oleg Nesterov
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Oleg Nesterov @ 2021-05-12 9:23 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Oleg Nesterov, Ingo Molnar, x86, linux-kernel
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 2b8ca1a907d5fffc85fb648bbace28ddf3420825
Gitweb: https://git.kernel.org/tip/2b8ca1a907d5fffc85fb648bbace28ddf3420825
Author: Oleg Nesterov <oleg@redhat.com>
AuthorDate: Mon, 10 May 2021 18:15:22 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 12 May 2021 11:03:54 +02:00
sched/core: Remove the pointless BUG_ON(!task) from wake_up_q()
container_of() can never return NULL - so don't check for it pointlessly.
[ mingo: Twiddled the changelog. ]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210510161522.GA32644@redhat.com
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 5226cc2..61d1d85 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -585,7 +585,6 @@ void wake_up_q(struct wake_q_head *head)
struct task_struct *task;
task = container_of(node, struct task_struct, wake_q);
- BUG_ON(!task);
/* Task can safely be re-inserted now: */
node = node->next;
task->wake_q.next = NULL;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-12 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 16:15 [PATCH] remove the pointless BUG_ON(!task) from wake_up_q() Oleg Nesterov
2021-05-12 9:23 ` [tip: sched/core] sched/core: Remove " tip-bot2 for Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).