[LTP] [PATCH 3/6] API/cgroups: Check for unknown controller name

Richard Palethorpe rpalethorpe@suse.de
Thu May 20 10:13:56 CEST 2021


hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
> So as far as I can tell this only shuffles code around but the
> functionality is the same since we moved the controller check from the
> tst_cgroup_ver() and tst_cgroup_require() to a common function.
>
> I'm not sure that this is worth the trouble.

It causes tst_brk to be called when the controller name is not found
instead of a null deref.

Although it may not be worth creating the function because tst_brk can
return as far as the compiler is concerned (although tst_require should
never be called from cleanup context). So I need to look at this again.

-- 
Thank you,
Richard.


More information about the ltp mailing list