lkml.org 
[lkml]   [2009]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG null dereference in driver ./drivers/usb/misc/sisusbvga/sisusb.c
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


\
 
 \ /
  Last update: 2009-12-21 17:25    [W:0.033 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site