Re: [CHECKER] 120 potential dereference to invalid pointers errors for linux 2.4.1

From: Greg KH (greg@kroah.com)
Date: Sat Mar 17 2001 - 16:43:18 EST


On Sat, Mar 17, 2001 at 01:30:54AM -0800, Junfeng Yang wrote:
> ---------------------------------------------------------
> [BUG] dereference to invalid pointer "bluetooth" in error message
> /u2/acc/oses/linux/2.4.1/drivers/usb/bluetooth.c:924:bluetooth_read_bulk_callback: ERROR:NULL:828:924: Using NULL ptr "bluetooth" illegally! set by 'get_usb_bluetooth':828
>
> Start --->
> struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
> unsigned char *data = urb->transfer_buffer;
> unsigned int count = urb->actual_length;
> unsigned int i;
> unsigned int packet_size;
>
> ... DELETED 88 lines ...
>
> bluetooth->bulk_packet_pos = 0;
> }
>
> exit:
> Error --->
> FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev,
> usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),

This has already been fixed in a patch that was sent to the
linux-usb-devel and bluetooth mailing lists, but hasn't made it into the
kernel tree yet.

But good catch!

thanks,

greg k-h

-- 
greg@(kroah|wirex).com
http://immunix.org/~greg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:10 EST