Re: [PATCH 1/2] um: add uml_kmalloc_array() helper to avoid potential
Johannes Berg <[email protected]> Wed, 22 Jul 2026 16:49:12 +0200
| Newsgroups | org.infradead.lists.linux-um,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2026-01-20 at 19:28 +0800, [email protected] wrote: > From: Haisu Wang <[email protected]> >=20 > Add uml_kmalloc_array to avoid potential dynamic multiplication > overflow. Since in Documentation/process/deprecated.rst, > the preferred way is avoid the open-coded arithmetic. Personally, I think it's kind of pointless because the only two users have small static arguments ... but if you want to continue with this then >=20 > +extern void *uml_kmalloc_array(int count, int size, int flags); the prototype should probably match better and use size_t, size_t, unsigned int? johannes