All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jesse Barnes <jbarnes@engr.sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] handle usb host allocation failures
Date: Wed, 29 Sep 2004 16:20:37 -0700	[thread overview]
Message-ID: <20040929232037.GC26548@kroah.com> (raw)
In-Reply-To: <200409271517.32192.jbarnes@engr.sgi.com>

On Mon, Sep 27, 2004 at 03:17:32PM -0700, Jesse Barnes wrote:
> It looks like a host (like ohci or whatever) could try to allocate a new 
> usb_device structure with usb_alloc_dev and get back a valid pointer even if 
> the allocation of its private data failed.  I first saw this in the 2.4 
> sources, but it looks like 2.6 has the same problem.  This patch attempts to 
> fix it by freeing dev if the ->allocate() routine fails, and then returns 
> NULL instead of a potentially dangerous dev pointer.
> 
> Signed-off-by: Jesse Barnes <jbarnes@sgi.com>

Applied, thanks.

greg k-h

      reply	other threads:[~2004-09-29 23:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-27 22:17 [PATCH] handle usb host allocation failures Jesse Barnes
2004-09-29 23:20 ` Greg KH [this message]

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=20040929232037.GC26548@kroah.com \
    --to=greg@kroah.com \
    --cc=jbarnes@engr.sgi.com \
    --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 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.