From: Markus Elfring <Markus.Elfring@web.de>
To: Henry Martin <bsdhenrymartin@gmail.com>, linux-tegra@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Jassi Brar <jassisinghbrar@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>
Subject: Re: [PATCH] mailbox: tegra-hsp: Fix null-ptr-deref in tegra_hsp_doorbell_create()
Date: Wed, 2 Apr 2025 21:31:47 +0200 [thread overview]
Message-ID: <e13c8dee-2631-4366-a51c-6a47dabf23d6@web.de> (raw)
In-Reply-To: <20250402144115.45564-1-bsdhenrymartin@gmail.com>
> devm_kstrdup_const() returns NULL when memory allocation fails.
…
failed?
Can a summary phrase like “Prevent null pointer dereference
in tegra_hsp_doorbell_create()” be a bit nicer?
…
> +++ b/drivers/mailbox/tegra-hsp.c
> @@ -293,6 +293,8 @@ tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name,
> db->channel.hsp = hsp;
>
> db->name = devm_kstrdup_const(hsp->dev, name, GFP_KERNEL);
> + if (!db->name)
> + return ERR_PTR(-ENOMEM);
Can a blank line be desirable after such a statement?
Regards,
Markus
next prev parent reply other threads:[~2025-04-02 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 14:41 [PATCH v1] " Henry Martin
2025-04-02 19:31 ` Markus Elfring [this message]
2025-05-08 21:54 ` Thierry Reding
2025-05-09 6:58 ` henry martin
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=e13c8dee-2631-4366-a51c-6a47dabf23d6@web.de \
--to=markus.elfring@web.de \
--cc=bsdhenrymartin@gmail.com \
--cc=jassisinghbrar@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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
all inboxes | Powered by JetHome®