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
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
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
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
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