APPLIED: [Unstable/N][PATCH] UBUNTU: SAUCE: modpost: Replace 0-length array with flex-array member
Andrea Righi
andrea.righi at canonical.com
Thu Feb 22 19:57:54 UTC 2024
On Thu, Feb 22, 2024 at 07:45:00PM +0100, Juerg Haefliger wrote:
> Fake flexible arrays (zero-length and one-element arrays) are deprecated,
> and should be replaced by flexible-array members. This fixes the following
> compiler warning:
>
> CC kernel/module/version.o
> ../kernel/module/version.c: In function 'check_version':
> ../kernel/module/version.c:37:21: warning: 'strcmp' reading 1 or more bytes from a region of size 0 [-Wstringop-overread]
> 37 | if (strcmp(versions->name, symname) != 0)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../kernel/module/version.c:8:
> ../include/linux/module.h:41:14: note: source object 'name' of size 0
> 41 | char name[0];
> | ^~~~
>
> Fixes: 08bc01030daa ("UBUNTU: SAUCE: modpost: support arbitrary symbol length in modversion")
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
Applied to noble/linux and noble/linux-unstable.
Thanks!
-Andrea
More information about the kernel-team
mailing list