• Alan Stern's avatar
    USB: check the endpoint type against the pipe type · f661c6f8
    Alan Stern authored
    This patch (as1316) adds some error checking to usb_submit_urb().
    It's conditional on CONFIG_USB_DEBUG, so it won't affect normal users.
    The new check makes sure that the actual type of the endpoint
    described by urb->pipe agrees with the type encoded in the pipe value.
    
    The USB error code documentation is updated to include the code
    returned by the new check, and the usbfs SUBMITURB handler is updated
    to use the correct pipe type when legacy user code tries to submit a
    bulk transfer to an interrupt endpoint.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    
    f661c6f8
urb.c 27.5 KB