From: Richard Weinberger <richard@nod.at>
To: "Michał Kępień" <kernel@kempniu.pl>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd <linux-mtd@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] mtdchar: use kvmalloc() for potentially large allocations
Date: Tue, 7 Jun 2022 22:30:28 +0200 (CEST) [thread overview]
Message-ID: <75745632.147517.1654633828458.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20220516070601.11428-3-kernel@kempniu.pl>
----- Ursprüngliche Mail -----
> Von: "Michał Kępień" <kernel@kempniu.pl>
> An: "Miquel Raynal" <miquel.raynal@bootlin.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra" <vigneshr@ti.com>
> CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "linux-kernel" <linux-kernel@vger.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@nod.at>
> Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Looks good to me.
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2022-06-07 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 7:05 [PATCH 0/2] mtdchar_write_ioctl(): prevent integer overflow, use kvmalloc() Michał Kępień
2022-05-16 7:06 ` [PATCH 1/2] mtdchar: prevent integer overflow in a safety check Michał Kępień
2022-06-07 20:23 ` Richard Weinberger
2022-06-09 13:10 ` Miquel Raynal
2022-05-16 7:06 ` [PATCH 2/2] mtdchar: use kvmalloc() for potentially large allocations Michał Kępień
2022-06-07 20:30 ` Richard Weinberger [this message]
2022-06-09 13:10 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75745632.147517.1654633828458.JavaMail.zimbra@nod.at \
--to=richard@nod.at \
--cc=kernel@kempniu.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox