Re: [PATCH RT 5/8] sched: Fix affine_move_task() self-concurrency

From
Valentin Schneider <hidden>
Date
2021-07-26 13:41:23
Also in
lkml
Reply to
Pavel Machek, 2021-07-25
On 25/07/21 07:03, Pavel Machek wrote:
Hi!
quoted
5.10.47-rt46-rc1 stable review patch.
If anyone has any objections, please let me know.

Add set_affinity_pending::stop_pending, to indicate if a stopper is in
progress.
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9cbe12d8c5bd..20588a59300d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1900,6 +1900,7 @@ struct migration_arg {

 struct set_affinity_pending {
     refcount_t		refs;
+	unsigned int		stop_pending;
     struct completion	done;
     struct cpu_stop_work	stop_work;
     struct migration_arg	arg;
For better readability, this should be bool, AFAICT.
It's intentionally declared as an int. sizeof(_Bool) is Implementation
Defined, so you can't sanely reason about struct layout.

There's been quite a few threads about this already, a quick search on lore
gave me:

https://lore.kernel.org/lkml/20180411081502.GJ4082@hirez.programming.kicks-ass.net/ (local)
Thread (12 messages) 12 messages, 4 authors, last reply 2021-07-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help