* Re: BUG null dereference in driver ./drivers/usb/misc/sisusbvga/sisusb.c
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
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2009-12-21 16:20 UTC (permalink / raw)
To: Alexander Strakh; +Cc: Thomas Winischhofer, linux-usb, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* BUG null dereference in driver ./drivers/usb/misc/sisusbvga/sisusb.c
@ 2009-12-21 20:03 Alexander Strakh
2009-12-21 16:20 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Strakh @ 2009-12-21 20:03 UTC (permalink / raw)
To: Thomas Winischhofer, Greg Kroah-Hartman, linux-usb, linux-kernel
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);
Found by Linux Device Drivers Verification Project (Svace Detector)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-21 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox