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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> 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.

>  		 * and have the stopper function handle it all race-free.
>  		 */
> +		stop_pending = pending->stop_pending;
> +		if (!stop_pending)
> +			pending->stop_pending = true;
>  
...because it is used as bool.

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux