[LTP] [PATCH] cgroup_dir_mk: set the umask to '0' before creating the subdir

Wei Gao wegao@suse.com
Sun Mar 3 11:33:19 CET 2024


On Fri, Mar 01, 2024 at 12:51:31PM +0100, Petr Vorel wrote:
> Hi Li, Wei,
> 
> > This is to resolve the permission issue when creating
> > a new subdir in the cgroup, in case of system's default
> > umask is 0077, this will trigger issues for LTP case.
> 
> >  cgroup_core01.c will report following error msg:
> >  cgroup_core01.c:50: TBROK: openat(21</sys/fs/cgroup/memory/ltp/test-3519/child_b>, 'tasks', 2, 0): EACCES (13)
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> Setting this on single place which *should* fix problems, but still not affect
> whole LTP API looks good to me. BTW there were more tests which needed it,
> e.g. testcases/kernel/syscalls/statx/statx07.c
> https://patchwork.ozlabs.org/project/ltp/patch/20240222031018.12281-3-wegao@suse.com/
> 
Send new patch for stat07:
https://patchwork.ozlabs.org/project/ltp/patch/20240303103105.13401-1-wegao@suse.com/

> Therefore this solves just some problems.
> 
> Kind regards,
> Petr
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp


More information about the ltp mailing list