Added failure check for usb_assign_descriptors call in bind function.
Acked-By: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Pavitrakumar Managutte <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Removed usb_free_all_descriptors in the bind functions, which
results in double-free corruption of the descriptors on error path.
The usb descriptors are allocated by usb_assign_descriptors.
Signed-off-by: Pavitrakumar Managutte <[email protected]>
Reviewed-by: Robert Baldyga <[email protected]>
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Unfortunately, the USB gadget layer has this weird things where NULL
skbs are passed into ops->ndo_start_xmit() in order to trigger the
dev->wrap() calls to build packets.
This is completely outside of the allowable range of sane arguments
for the ndo_start_xmit method. All invocations of ndo_start_xmit()
should be with non-NULL SKB arguments.
Put back the direct call, but with a comment explaining how this
is not acceptable in the long term.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
The drivers/usb/gadget directory contains many files.
Files which are related can be distributed into separate directories.
This patch moves the USB functions implementations into a separate directory.
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>