Re: [tip: timers/urgent] timers/migration: Prevent out of bounds access on failure
From: Andy Shevchenko
Date: Wed May 08 2024 - 05:58:16 EST
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