[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <175916178765.52129.18095278414992754665.b4-ty@bootlin.com>
Date: Mon, 29 Sep 2025 18:03:07 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: richard@....at, vigneshr@...com,
Gopi Krishna Menon <krishnagopi487@...il.com>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org, david.hunter.linux@...il.com,
linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] mtd: cfi: use struct_size() helper for cfiq allocation
On Fri, 19 Sep 2025 00:14:14 +0530, Gopi Krishna Menon wrote:
> Documentation/process/deprecated.rst recommends against performing
> dynamic size calculations in the arguments of memory allocator
> function due to the risk of overflow. Such calculations can
> wrap around and result in a smaller allocation than what the caller
> was expecting.
>
> Replace the size calculation in cfiq allocation with struct_size()
> helper to make the code clearer and handle the overflows correctly.
>
> [...]
Applied to mtd/next, thanks!
[1/1] mtd: cfi: use struct_size() helper for cfiq allocation
commit: d496b6f42eb0455caf5d8cb30cf1f01b7fc2a747
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
Powered by blists - more mailing lists