From: Ben Skeggs <bskeggs@redhat.com>
To: Daeseok Youn <daeseok.youn@gmail.com>
Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/nouveau/clk: fix possible NULL pointer dereference
Date: Tue, 15 Apr 2014 03:00:35 -0400 (EDT) [thread overview]
Message-ID: <1876072135.7241792.1397545235729.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <3009531.aHrQhHYAOc@daeseok-laptop.cloud.net>
----- Original Message -----
> From: "Daeseok Youn" <daeseok.youn@gmail.com>
> To: airlied@linux.ie
> Cc: bskeggs@redhat.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
> Sent: Tuesday, 15 April, 2014 11:56:49 AM
> Subject: [PATCH] drm/nouveau/clk: fix possible NULL pointer dereference
>
>
> It need to be checking NULL before dereferencing.
There's no dereference here. It's an address calculation only.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> drivers/gpu/drm/nouveau/core/subdev/clock/base.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> index dd62bae..a586d030 100644
> --- a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> @@ -290,9 +290,9 @@ nouveau_pstate_new(struct nouveau_clock *clk, int idx)
> return 0;
>
> pstate = kzalloc(sizeof(*pstate), GFP_KERNEL);
> - cstate = &pstate->base;
> if (!pstate)
> return -ENOMEM;
> + cstate = &pstate->base;
>
> INIT_LIST_HEAD(&pstate->list);
>
> --
> 1.7.4.4
>
>
>
next prev parent reply other threads:[~2014-04-15 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 1:56 Daeseok Youn
2014-04-15 7:00 ` Ben Skeggs [this message]
2014-04-15 9:15 ` DaeSeok Youn
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=1876072135.7241792.1397545235729.JavaMail.zimbra@redhat.com \
--to=bskeggs@redhat.com \
--cc=airlied@linux.ie \
--cc=daeseok.youn@gmail.com \
--cc=dri-devel@lists.freedesktop.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
Powered by JetHome