Re: [PATCH][next] cgroup: Avoid -Wstringop-overflow warnings

From: Tejun Heo
Date: Wed Aug 16 2023 - 15:23:20 EST


On Tue, Aug 15, 2023 at 01:04:32PM -0600, Gustavo A. R. Silva wrote:
> Hi all,
>
> I wonder if you have any suggestions on how to address this issue. As it seems that
> my last attempt caused some boot failures[1][2].
>
> At first, I thought that the right way to fix this was through a similar fix as this
> one[3]. But it seems I'm missing something else that I cannot determine yet.
>
> These -Wstringop-overflow warnings are mostly the last ones remaining before we can
> finally enable this compiler option, globally.
>
> Any help or advice on how to properly address this is greatly appreciated. :)

It looks like there are only two functions which misbehave when there are no
controllers configured. Maybe just fix them so that they don't access empty
array?

Thanks.

--
tejun