From: Greg KH <gregkh@suse.de>
To: Kees Cook <kees.cook@canonical.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Stefan Ringel <stefan.ringel@arcor.de>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] staging: fix possible use-before-NULL-check crash
Date: Wed, 6 Oct 2010 15:51:04 -0700 [thread overview]
Message-ID: <20101006225104.GA21013@suse.de> (raw)
In-Reply-To: <20101006223941.GW14666@outflux.net>
On Wed, Oct 06, 2010 at 03:39:41PM -0700, Kees Cook wrote:
> Found via http://coccinelle.lip6.fr/rules/mini_null_ref.cocci
>
> Signed-off-by: Kees Cook <kees.cook@canonical.com>
> ---
> drivers/staging/tm6000/tm6000-alsa.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c
> index 087137d..c1aff0e 100644
> --- a/drivers/staging/tm6000/tm6000-alsa.c
> +++ b/drivers/staging/tm6000/tm6000-alsa.c
> @@ -426,10 +426,11 @@ error:
>
> static int tm6000_audio_fini(struct tm6000_core *dev)
> {
> - struct snd_tm6000_card *chip = dev->adev;
> + struct snd_tm6000_card *chip;
>
> if (!dev)
> return 0;
> + chip = dev->adev;
Nice catch, but I don't think that the dev pointer can ever be NULL
here.
Mauro, can you queue this up through your tree, as you handle this one?
thanks,
greg k-h
next prev parent reply other threads:[~2010-10-06 22:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 22:39 [PATCH] staging: fix possible use-before-NULL-check crash Kees Cook
2010-10-06 22:51 ` Greg KH [this message]
2010-10-07 0:12 ` Kees Cook
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=20101006225104.GA21013@suse.de \
--to=gregkh@suse.de \
--cc=devel@driverdev.osuosl.org \
--cc=kees.cook@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=sfr@canb.auug.org.au \
--cc=stefan.ringel@arcor.de \
/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