[LTP] [PATCH v3] memcg/memcontrol04: Fix judgment for recursive_protection

Petr Vorel pvorel@suse.cz
Wed Jan 15 13:17:44 CET 2025


Hi Li, Jin Guojie all,

> On Wed, Jan 15, 2025 at 2:33 PM Jin Guojie <guojie.jin@gmail.com> wrote:

Jin Guojie, thanks for handling this!

> > V3:
> > * Fix initialization of root->memory_recursiveprot
> > * The use of tst_cg_memory_recursiveprot(leaf_cg[F]) is changed to safe
> > check
> > * The type of memory_recursiveprot is changed to unsigned int
> > * Rebase the code to the latest branch
nit: if you add notes like version changelog (or other notes which should not be
part of the final commit message) below --- (above of the list of changed
files) we will see them in ML, but it will not be in git commit message.

> Thanks for refining this, code looks good to me, but as I pointed out
> can you rebase the patch on the latest branch? Otherwise, maintainer
> gets a conflict when applying your patch.

> Reviewed-by: Li Wang <liwang@redhat.com>

Acked-by: Petr Vorel <pvorel@suse.cz>

I also updated patchwork states for all versions of this.

> @Cyril, @Petr, I vote to merge this one before the release, and I also think

+1

> we need an additional tiny fix like below:

+1, Li, could you please send a regular patch for it?

Kind regards,
Petr

> --- a/lib/tst_cgroup.c
> +++ b/lib/tst_cgroup.c
> @@ -44,7 +44,7 @@ struct cgroup_dir {
>          */
>         int dir_fd;

> -       int we_created_it:1;
> +       unsigned int we_created_it:1;
>  };

>  /* The root of a CGroup hierarchy/tree */
> @@ -71,12 +71,12 @@ struct cgroup_root {
>         /* CGroup for current test. Which may have children. */
>         struct cgroup_dir test_dir;

> -       int nsdelegate:1;
> -       int memory_recursiveprot:1;
> +       unsigned int nsdelegate:1;
> +       unsigned int memory_recursiveprot:1;

> -       int we_mounted_it:1;
> +       unsigned int we_mounted_it:1;
>         /* cpuset is in compatability mode */
> -       int no_cpuset_prefix:1;
> +       unsigned int no_cpuset_prefix:1;
>  };


More information about the ltp mailing list