All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Jesper Juhl <jj@chaosbits.net>
Subject: Re: [PATCH] AudioScience HPI driver: Unsafe memory management when allocating control cache
Date: Tue, 02 Nov 2010 11:19:36 +1300	[thread overview]
Message-ID: <4CCF3CF8.7060300@audioscience.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1010292124180.24561@swampdragon.chaosbits.net>

On 30/10/10 08:35, Jesper Juhl wrote:
> I noticed that sound/pci/asihpi/hpicmn.c::hpi_alloc_control_cache() does 
> not check the return value from kmalloc(), which may fail.
> If kmalloc() fails we'll dereference a null pointer and things will go bad 
> fast.
> There are two memory allocations in that function and there's also the 
> problem that the first may succeed and the second may fail and nothing is 
> done about that either which will also go wrong down the line.

Thanks Jesper,

your changes look fine.

Acked-by: Eliot Blennerhassett <linux@audioscience.com>

  reply	other threads:[~2010-11-01 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 19:35 [PATCH] AudioScience HPI driver: Unsafe memory management when allocating control cache Jesper Juhl
2010-11-01 22:19 ` Eliot Blennerhassett [this message]
2010-11-02  6:39   ` Takashi Iwai

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=4CCF3CF8.7060300@audioscience.com \
    --to=eblennerhassett@audioscience.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jj@chaosbits.net \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.