[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <75745632.147517.1654633828458.JavaMail.zimbra@nod.at>
Date: Tue, 7 Jun 2022 22:30:28 +0200 (CEST)
From: Richard Weinberger <richard@....at>
To: Michał Kępień <kernel@...pniu.pl>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>,
Vignesh Raghavendra <vigneshr@...com>,
linux-mtd <linux-mtd@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] mtdchar: use kvmalloc() for potentially large
allocations
----- Ursprüngliche Mail -----
> Von: "Michał Kępień" <kernel@...pniu.pl>
> An: "Miquel Raynal" <miquel.raynal@...tlin.com>, "richard" <richard@....at>, "Vignesh Raghavendra" <vigneshr@...com>
> CC: "linux-mtd" <linux-mtd@...ts.infradead.org>, "linux-kernel" <linux-kernel@...r.kernel.org>
> Gesendet: Montag, 16. Mai 2022 09:06:01
> Betreff: [PATCH 2/2] mtdchar: use kvmalloc() for potentially large allocations
> mtdchar_write_ioctl() calls kmalloc() with the 'size' argument set to
> the smaller of two values: the write request's data/OOB length provided
> by user space and the erase block size of the MTD device. If the latter
> is large, kmalloc() may not be able to serve such allocation requests.
> Use kvmalloc() instead. Correspondingly, replace kfree() calls with
> kvfree() calls.
>
> Suggested-by: Richard Weinberger <richard@....at>
> Signed-off-by: Michał Kępień <kernel@...pniu.pl>
Looks good to me.
Acked-by: Richard Weinberger <richard@....at>
Thanks,
//richard
Powered by blists - more mailing lists