Re: [PATCH] [v2] landlock: work around gcc-16 -Wuninitialized warning

From: Arnd Bergmann

Date: Thu Sep 17 2026 - 07:37:33 EST


On Thu, Sep 17, 2026, at 12:45, Sebastian Andrzej Siewior wrote:
> On 2026-09-17 12:26:17 [+0200], Arnd Bergmann wrote:
>> I checked again and found that this is a config that did produce
>> the issue a few weeks ago, but doesn't today for me.
>> I found a different config from this week and managed to reproduce
>> the problem on today's linux-next using both gcc-16.2 and gcc-17.0
>> from yesterday, so there is still a related issue that is not
>> fixed in gcc, even though one at least one of them was fixed.
>
> Confirmed. I see the warning on arm64 while x86-64 is quiet. The patch
> fixes the issue.
>
> You might need to update gcc bug tracker.

Correction: I noticed the failing gcc-17 binary was an old one,
the current snapshot does not produce the warning any more.
It does seem like the fix was not yet backported to older compilers,
and seeing that the final gcc-13.x was released, we will
continue to need the kernel workaround. I assume the compiler
fix will eventually make its way into the other stable branches.

Arnd