[PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error

2016-01-03 Thread Pavitrakumar Managutte
Fixed skb_clone pointer memleak on error path. Since the newly cloned skb is still not added to the list, hence purge list wont free the cloned skb. stable-3.14.y: 5d7b0fcc26 Signed-off-by: Pavitrakumar Managutte --- drivers/usb/gadget/f_ncm.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] usb: gadget: function: Added usb_assign_descriptors failure check

2014-10-27 Thread Pavitrakumar Managutte
Added failure check for usb_assign_descriptors call in bind function. Signed-off-by: Pavitrakumar Managutte --- drivers/usb/gadget/function/f_ncm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index bcdc882

[PATCH] usb: gadget: function: Fixed the return value on error path

2014-10-22 Thread Pavitrakumar Managutte
Fixed the return value on failure. status variable is set to 0 at usb_assign_descriptors call and the same is returned on error which is incorrect. Signed-off-by: Pavitrakumar Managutte --- drivers/usb/gadget/function/f_rndis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v3] usb: gadget: function: Remove redundant usb_free_all_descriptors

2014-10-22 Thread Pavitrakumar Managutte
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 Reviewed-by: Robert Baldyga Reviewed-by: Sebastian Andrzej Siewior

[PATCH] usb: gadget: function: Remove redundant usb_free_all_descriptors

2014-10-22 Thread Pavitrakumar Managutte
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 Reviewed-by: Robert Baldyga Reviewed-by: Sebastian Andrzej Siewior