From: Cosmin Ratiu <cratiu@nvidia.com>
To: "andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"jdamato@fastly.com" <jdamato@fastly.com>,
Tariq Toukan <tariqt@nvidia.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"sdf@fomichev.me" <sdf@fomichev.me>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"almasrymina@google.com" <almasrymina@google.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH net v2] tests/ncdevmem: Fix double-free of queue array
Date: Fri, 9 May 2025 07:21:45 +0000 [thread overview]
Message-ID: <86045fadea030cb8c925c09942ebc5cb164a0f85.camel@nvidia.com> (raw)
In-Reply-To: <aBz4fjK8bPKG3KLM@LQ3V64L9R2>
On Thu, 2025-05-08 at 11:31 -0700, Joe Damato wrote:
>
> Nit: it looks like in the original we didn't care about malloc
> potentially failing. Do we care about checking for that now with
> this cleanup?
Thank you for the review, Joe.
I looked a bit into adding error messages and I think it wouldn't make
sense just for these allocations, as there are others which do not
check for malloc/calloc error (e.g. all generated ynl libs).
Furthermore, I am under the impression that on the kind of systems
ncdevmem would run, malloc/calloc would almost never fail because of
overcommit.
Finally, even if they did fail, the user program would just segfault
(not very user friendly, but good enough).
Cosmin.
next prev parent reply other threads:[~2025-05-09 7:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 8:44 [PATCH net v2] tests/ncdevmem: Fix double-free of queue array Cosmin Ratiu
2025-05-08 16:23 ` Stanislav Fomichev
2025-05-08 18:31 ` Joe Damato
2025-05-09 7:21 ` Cosmin Ratiu [this message]
2025-05-08 20:42 ` Mina Almasry
2025-05-09 7:24 ` Cosmin Ratiu
2025-05-09 23:30 ` patchwork-bot+netdevbpf
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=86045fadea030cb8c925c09942ebc5cb164a0f85.camel@nvidia.com \
--to=cratiu@nvidia.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=tariqt@nvidia.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