[PATCH] mtd: rawnand: qcom: Fix build issue on x86 architecture

Miquel Raynal miquel.raynal at bootlin.com
Wed Jan 8 10:28:18 PST 2025


On Mon, 06 Jan 2025 18:45:58 +0530, Md Sadre Alam wrote:
> Fix a buffer overflow issue in qcom_clear_bam_transaction by using
> struct_group to group related fields and avoid FORTIFY_SOURCE warnings.
> 
> On x86 architecture, the following error occurs due to warnings being
> treated as errors:
> 
> In function ‘fortify_memset_chk’,
>     inlined from ‘qcom_clear_bam_transaction’ at
> drivers/mtd/nand/qpic_common.c:88:2:
> ./include/linux/fortify-string.h:480:25: error: call to ‘__write_overflow_field’
> declared with attribute warning: detected write beyond size of field
> (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
>   480 |                         __write_overflow_field(p_size_field, size);
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   LD [M]  drivers/mtd/nand/nandcore.o
>   CC [M]  drivers/w1/masters/mxc_w1.o
> cc1: all warnings being treated as errors
> 
> [...]

Applied to nand/next, thanks!

[1/1] mtd: rawnand: qcom: Fix build issue on x86 architecture
      commit: b9371866799d67a80be0ea9e01bd41987db22f26

Patche(s) will be available within hours on:
mtd/linux.git

Kind regards,
Miquèl




More information about the linux-mtd mailing list