BUG null dereference in driver ./drivers/usb/misc/sisusbvga/sisusb.c
KERNEL_VERSION: 2.6.32
SUBJECT: null derefernce in function sisusb_probe SUBSCRIBE:
In driver drivers/usb/misc/sisusbvga/sisusb.c in functionsisusb_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)
Quoted 10 lines · Alexander Strakh
KERNEL_VERSION: 2.6.32
SUBJECT: null derefernce in functionsisusb_probeSUBSCRIBE:
In driverdrivers/usb/misc/sisusbvga/sisusb.cin functionsisusb_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".
Quoted 7 lines
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 }
3089kref_init(&sisusb->kref);
Good catch, care to send a patch?
thanks,
greg k-h