Re: [tip: timers/urgent] timers/migration: Prevent out of bounds access on failure

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

 



On Wed, May 08, 2024 at 09:45:41AM -0000, tip-bot2 for Levi Yun wrote:
> The following commit has been merged into the timers/urgent branch of tip:

(Yes, I noted above)

..

> -	do {
> +	while (i > 0) {
>  		group = stack[--i];

Looking at this and most used patterns for cleanup loops, I would amend
this to

	while (i--) {
		group = stack[i];

which seems to me an equivalent.

>  		if (err < 0) {
> @@ -1645,7 +1645,7 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
>  				tmigr_connect_child_parent(child, group);
>  			}
>  		}
> -	} while (i > 0);
> +	}

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux