[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <175916179288.52129.13789986252755392222.b4-ty@bootlin.com>
Date: Mon, 29 Sep 2025 18:03:12 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: richard@....at, vigneshr@...com, Rahul Kumar <rk0006818@...il.com>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org, skhan@...uxfoundation.org
Subject: Re: [PATCH] mtd: jedec_probe: use struct_size() helper for cfiq
allocation
On Mon, 22 Sep 2025 12:41:37 +0530, Rahul Kumar wrote:
> Documentation/process/deprecated.rst recommends against performing
> dynamic size calculations in the arguments of memory allocator
> functions due to the risk of overflow. Such calculations can wrap
> around and result in a smaller allocation than expected.
>
> Replace the size calculation in cfiq allocation with struct_size()
> helper to make the code clearer and handle overflows correctly.
>
> [...]
Applied to mtd/next, thanks!
[1/1] mtd: jedec_probe: use struct_size() helper for cfiq allocation
commit: 527668868862e0db65efc88fe82040f1e48d4ab3
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