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

2014-10-14 Thread pavi1729
On Wed, Oct 15, 2014 at 10:41 AM, Robert Baldyga wrote: > On 10/13/2014 04:25 PM, pavi1729 Sid wrote: >> Removed the usb_free_all_descriptors call in *_bind functions >> as this call is already present in usb_assign_descriptors. >> usb_assign_descriptors is the only call

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

2014-10-15 Thread pavi1729
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 --- drivers/usb/gadget/function/f_eem.

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

2014-10-17 Thread pavi1729
On Fri, Oct 17, 2014 at 6:09 PM, Sebastian Andrzej Siewior wrote: > * pavi1729 | 2014-10-15 14:47:53 [+0530]: > >>Removed usb_free_all_descriptors in the bind functions, which >>results in double-free corruption of the descriptors on error path. >>The usb desc

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

2014-10-26 Thread pavi1729
Sebastian, Will push the patch today for the second issue today. Was on Diwali holidays .. :) Cherrs,, Pavitra On Thu, Oct 23, 2014 at 3:48 PM, Sebastian Andrzej Siewior wrote: > On 10/22/2014 04:03 PM, Pavitrakumar Managutte wrote: >> Fixed the return value on failure. status variable >> is

Query : drivers/usb/gadget/function/f_eem.c : eem_bind

2014-10-09 Thread pavi1729 ivap
Hi, Isn't the "usb_free_all_descriptors(f)" after "fail" label redundant? Is it needed at all ? FILE : drivers/usb/gadget/function/f_eem.c FUNCTION : eem_bind In fact this can cause "double-free" in case of failures from "usb_assign_descriptors"; cause usb_assign_descriptors alread

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

2014-10-10 Thread pavi1729 ivap
>From 3272817673910c63682e8b91ce0efaef190a399a Mon Sep 17 00:00:00 2001 From: Pavitra Date: Fri, 10 Oct 2014 16:05:30 +0530 Subject: [PATCH] usb: gadget: function: Remove redundant usb_free_all_descriptors Removed the usb_free_all_descriptors call in *_bind functions as this call is already pres

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

2014-10-10 Thread pavi1729 ivap
0/2014 01:51 PM, pavi1729 ivap wrote: >>>From 3272817673910c63682e8b91ce0efaef190a399a Mon Sep 17 00:00:00 2001 >> From: Pavitra >> Date: Fri, 10 Oct 2014 16:05:30 +0530 >> Subject: [PATCH] usb: gadget: function: Remove redundant >> usb_free_all_descriptors >>

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

2014-10-10 Thread pavi1729 ivap
Oh! precisely what you are saying .. On Fri, Oct 10, 2014 at 6:21 PM, pavi1729 ivap wrote: > Rob, >Got your point, will submit a new patch with a new error label. > Also I just found that in f_hid.c f_rndis.c and f_uac2.c do need the > freeing function. > Will clean it up and

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

2014-10-10 Thread pavi1729 ivap
From: Pavitra Date: Fri, 10 Oct 2014 16:05:30 +0530 Subject: [PATCH] usb: gadget: function: Remove redundant usb_free_all_descriptors Removed the usb_free_all_descriptors call in *_bind functions as this call is already present in usb_assign_descriptors. usb_assign_descriptors is the only call w

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

2014-10-13 Thread pavi1729 Sid
On Mon, Oct 13, 2014 at 2:02 PM, Robert Baldyga wrote: > Hi, > > On 10/10/2014 03:09 PM, pavi1729 ivap wrote: >> From: Pavitra >> Date: Fri, 10 Oct 2014 16:05:30 +0530 >> Subject: [PATCH] usb: gadget: function: Remove redundant >> usb_free_

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

2014-10-13 Thread pavi1729 Sid
Removed the usb_free_all_descriptors call in *_bind functions as this call is already present in usb_assign_descriptors. usb_assign_descriptors is the only call where usb descriptor allocation happens, also in case of error freeing of the allocated memory takes place in the same call. Hence the cal

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

2014-10-13 Thread pavi1729 Sid
is number of version (eg. [PATCH v2]). See > Documentation/SubmittingPatches. > ('git format-patch --subject-prefix' is helpful). > > On 10/13/2014 11:35 AM, pavi1729 Sid wrote: >> Removed the usb_free_all_descriptors call in *_bind functions >> as this call is already present in

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

2014-10-13 Thread pavi1729 Sid
Removed the usb_free_all_descriptors call in *_bind functions as this call is already present in usb_assign_descriptors. usb_assign_descriptors is the only call where usb descriptor allocation happens and in case of error, freeing of the allocated memory takes place inside the same call. Hence the