> >* removed Tested-by: Alfredo Rafael Vicente Boix ;
>
> I added this back, as it matters, and your change from the previous
> version was trivial.
>
> >* removed Cc: sta...@vger.kernel.org
> > since this patch doesn't apply against v4.10.12
>
> I
Some local constants don't change from call to call and are good
candidates to become static. This will prevent copying of these
constants to stack during runtime.
Signed-off-by: Maksim Salau <maksim.sa...@gmail.com>
---
drivers/usb/serial/upd78f0730.c | 6 +++---
1 file changed, 3 inse
Allocate buffers on HEAP instead of STACK for local structures
that are to be received using usb_control_msg().
Signed-off-by: Maksim Salau <maksim.sa...@gmail.com>
---
Changes in v3:
* rebased against usb-next;
* removed Tested-by: Alfredo Rafael Vicente Boix <alvi...@
> + } else if (object_is_on_stack(urb->transfer_buffer)) {
> + WARN_ONCE(1, "transfer buffer is on stack\n");
> + ret = -EAGAIN;
> } else {
Hi,
Has anyone considered a fail-safe mode? I.e.: if a
On Fri, 18 Aug 2017 14:13:20 +0100
Ben Hutchings <b...@decadent.org.uk> wrote:
> 3.16.47-rc1 review patch. If anyone has any objections, please let me know.
>
> ------
>
> From: Maksim Salau <maksim.sa...@gmail.com>
>
> commit 942a48730faf149c
get_version_reply is not freed if function returns with success.
Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack")
Reported-by: Heikki Krogerus <heikki.kroge...@linux.intel.com>
Signed-off-by: Maksim Salau <maksim.sa...@gmail.com>
---
v2:
Changed ta
get_version_reply is not freed if function returns with success.
Memory leak was introduced by commit 942a48730faf149ccbf3e12ac718aee120bb3529
Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com>
Signed-off-by: Maksim Salau <maksim.sa...@gmail.com>
---
drivers/usb/misc/le
> > @@ -913,6 +929,7 @@ static int tower_probe (struct usb_interface
> > *interface, const struct usb_device
>
> Don't you need to free get_version_reply here?
>
> > return retval;
> >
> > error:
> > + kfree(get_version_reply);
> > tower_delete(dev);
> > return retval;
> > }
-off-by: Maksim Salau <msa...@iotecha.com>
---
`lsusb -v` of the device:
Bus 001 Device 003: ID 09d8:0320
Device Descriptor:
bLength18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass2 Communications
bDeviceSubClass 0
bDevicePr
-off-by: Maksim Salau
---
`lsusb -v` of the device:
Bus 001 Device 003: ID 09d8:0320
Device Descriptor:
bLength18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
On Fri, 18 Aug 2017 14:13:20 +0100
Ben Hutchings wrote:
> 3.16.47-rc1 review patch. If anyone has any objections, please let me know.
>
> --
>
> From: Maksim Salau
>
> commit 942a48730faf149ccbf3e12ac718aee120bb3529 upstream.
>
> Allocate buffe
> > @@ -913,6 +929,7 @@ static int tower_probe (struct usb_interface
> > *interface, const struct usb_device
>
> Don't you need to free get_version_reply here?
>
> > return retval;
> >
> > error:
> > + kfree(get_version_reply);
> > tower_delete(dev);
> > return retval;
> > }
get_version_reply is not freed if function returns with success.
Memory leak was introduced by commit 942a48730faf149ccbf3e12ac718aee120bb3529
Signed-off-by: Heikki Krogerus
Signed-off-by: Maksim Salau
---
drivers/usb/misc/legousbtower.c | 1 +
1 file changed, 1 insertion(+)
diff --git
get_version_reply is not freed if function returns with success.
Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack")
Reported-by: Heikki Krogerus
Signed-off-by: Maksim Salau
---
v2:
Changed tags to match guidelines.
drivers/usb/misc/legousbtower.c | 1 +
1 file
Some local constants don't change from call to call and are good
candidates to become static. This will prevent copying of these
constants to stack during runtime.
Signed-off-by: Maksim Salau
---
drivers/usb/serial/upd78f0730.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
> + } else if (object_is_on_stack(urb->transfer_buffer)) {
> + WARN_ONCE(1, "transfer buffer is on stack\n");
> + ret = -EAGAIN;
> } else {
Hi,
Has anyone considered a fail-safe mode? I.e.: if a
Allocate buffers on HEAP instead of STACK for local structures
that are to be received using usb_control_msg().
Signed-off-by: Maksim Salau
---
Changes in v3:
* rebased against usb-next;
* removed Tested-by: Alfredo Rafael Vicente Boix ;
* removed Cc: sta...@vger.kernel.org
> >* removed Tested-by: Alfredo Rafael Vicente Boix ;
>
> I added this back, as it matters, and your change from the previous
> version was trivial.
>
> >* removed Cc: sta...@vger.kernel.org
> > since this patch doesn't apply against v4.10.12
>
> I added this back as well
18 matches
Mail list logo