linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gen Zhang <blackgod016574@gmail.com>
To: jassisinghbrar@gmail.com
Cc: thierry.reding@gmail.com, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH] tegra-hsp: fix a missing-check bug in tegra_hsp_doorbell_create()
Date: Mon, 17 Jun 2019 02:23:28 -0700	[thread overview]
Message-ID: <20190617092328.GA3764@ubuntu> (raw)
In-Reply-To: <20190608161144.GA4090@zhanggen-UX430UQ>

On Sun, Jun 09, 2019 at 12:11:44AM +0800, Gen Zhang wrote:
> On Thu, May 30, 2019 at 09:19:20AM +0800, Gen Zhang wrote:
> > In tegra_hsp_doorbell_create(), 'db->name' is allocated by 
> > devm_kstrdup_const(). It returns NULL when fails. So 'db->name' should
> > be checked.
> > 
> > Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
> > Acked-by: Thierry Reding <treding@nvidia.com>
> > ---
> > diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
> > index 11fc9fd..b613c46 100644
> > --- a/drivers/mailbox/tegra-hsp.c
> > +++ b/drivers/mailbox/tegra-hsp.c
> > @@ -292,6 +292,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);
> >  	db->master = master;
> >  	db->index = index;
> >  
> > ---
> Can anyone look into this patch? It's acked by Thierry Reding 
> <treding@nvidia.com>.
> 
> Thanks
> Gen
Could anyone look into this patch? It's not updated for about 20 days.
And I am really on a deadline to get this patch applied.

Thanks
Gen

  reply	other threads:[~2019-06-17  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30  1:19 [PATCH] tegra-hsp: fix a missing-check bug in tegra_hsp_doorbell_create() Gen Zhang
2019-06-08 16:11 ` Gen Zhang
2019-06-17  9:23   ` Gen Zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-27 13:04 Gen Zhang
2019-05-27 14:05 ` Thierry Reding
2019-05-27 14:10   ` Gen Zhang

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=20190617092328.GA3764@ubuntu \
    --to=blackgod016574@gmail.com \
    --cc=jassisinghbrar@gmail.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;
as well as URLs for NNTP newsgroup(s).