public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Alexander Strakh <strakh@ispras.ru>
Cc: Thomas Winischhofer <thomas@winischhofer.net>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: BUG null dereference in driver ./drivers/usb/misc/sisusbvga/sisusb.c
Date: Mon, 21 Dec 2009 08:20:48 -0800	[thread overview]
Message-ID: <20091221162048.GB7091@suse.de> (raw)
In-Reply-To: <200912212003.10697.strakh@ispras.ru>

On Mon, Dec 21, 2009 at 08:03:10PM +0000, Alexander Strakh wrote:
>         KERNEL_VERSION: 2.6.32
>         SUBJECT: null derefernce in function sisusb_probe
>         SUBSCRIBE:
>         In driver drivers/usb/misc/sisusbvga/sisusb.c in function 
> sisusb_probe:
> 
> 1. if in line 3085 after calling function kzalloc variable sisub = 
> NULL, then we goto line 3086.
> 2. In line 3086:  null dereference of sisusb - "&sisusb->sisusb_dev->dev".
> 
> 3084         /* Allocate memory for our private */
> 3085         if (!(sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL))) {
> 3086                 dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate 
> memory for private data\n");
> 3087                 return -ENOMEM;
> 3088         }
> 3089         kref_init(&sisusb->kref);

Good catch, care to send a patch?

thanks,

greg k-h

      reply	other threads:[~2009-12-21 16:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 20:03 BUG null dereference in driver ./drivers/usb/misc/sisusbvga/sisusb.c Alexander Strakh
2009-12-21 16: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=20091221162048.GB7091@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=strakh@ispras.ru \
    --cc=thomas@winischhofer.net \
    /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