[LTP] [PATCH] lib: switch cgroup bit-fields from signed to unsigned int
Cyril Hrubis
chrubis@suse.cz
Fri Jan 24 12:19:57 CET 2025
Hi!
> There is a problem in cgroup lib that the declearation int
> can lead to -1 during the | operation.
>
> Becasue if the field contains uninitialized garbage data,
> a bit-field declared as int could interpret 0b1 as -1 due
> to signed arithmetic.
Uff, so we have a number that can be either -1 or 0. Where did it break?
I suppose that things are okay as long as we do if (s->bar | s->bar).
Anyways:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list