From: Jens Axboe <axboe@kernel.dk>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>, Chenyuan Mi <cymi20@fudan.edu.cn>
Cc: Pavel Begunkov <asml.silence@gmail.com>,
io-uring Mailing List <io-uring@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tools/io_uring: Fix missing check for return value of malloc()
Date: Thu, 15 Jun 2023 07:13:31 -0600 [thread overview]
Message-ID: <ec762677-f8d4-94ab-e7b3-adee45a052a1@kernel.dk> (raw)
In-Reply-To: <34898926-681e-1790-4303-e2b54e793a62@gnuweeb.org>
On 6/15/23 7:00?AM, Ammar Faizi wrote:
> On 6/15/23 7:50 PM, Chenyuan Mi wrote:
>> The malloc() function may return NULL when it fails,
>> which may cause null pointer deference in kmalloc(),
>
> It's a userspace app, there is no kmalloc(). Also, I don't think it's
> worth to fix a missing ENOMEM handling for that old test program. But
> anyway, let's wait for maintainers' comment on this.
Definitely not worth it, and I find it odd how the author would target
just one of multiple allocations in that file. I'm guessing it's because
this checker only checks for malloc(), and no thought has otherwise gone
into a) if the patch makes any sense at all, and b) if it does make
sense, are there potentially other cases to consider?
--
Jens Axboe
next prev parent reply other threads:[~2023-06-15 13:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 12:50 Chenyuan Mi
2023-06-15 13:00 ` Ammar Faizi
2023-06-15 13:13 ` Jens Axboe [this message]
[not found] ` <F5DC6786-D8E5-435F-8FDE-ABD4DD692367@fudan.edu.cn>
2023-06-15 13:37 ` [PATCH] tools/io uring: " Jens Axboe
2023-06-15 12:53 [PATCH] tools/io_uring: " Chenyuan Mi
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=ec762677-f8d4-94ab-e7b3-adee45a052a1@kernel.dk \
--to=axboe@kernel.dk \
--cc=ammarfaizi2@gnuweeb.org \
--cc=asml.silence@gmail.com \
--cc=cymi20@fudan.edu.cn \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®