Re: [PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-05-23 Thread Hans Verkuil
On 05/17/2014 02:21 PM, Ezequiel Garcia wrote: > Hi Hans, > > On 09 May 12:34 PM, Hans Verkuil wrote: >> On 04/17/2014 02:28 PM, Ezequiel Garcia wrote: >>> Currently stk1160_read_reg() uses a stack-allocated char to get the >>> read control value. This is wrong because usb_control_msg() requires >

Re: [PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-05-17 Thread Ezequiel Garcia
Hi Hans, On 09 May 12:34 PM, Hans Verkuil wrote: > On 04/17/2014 02:28 PM, Ezequiel Garcia wrote: > > Currently stk1160_read_reg() uses a stack-allocated char to get the > > read control value. This is wrong because usb_control_msg() requires > > a kmalloc-ed buffer. > > > > This commit fixes suc

Re: [PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-05-09 Thread Ezequiel Garcia
On 09 May 12:34 PM, Hans Verkuil wrote: > Hi Ezequiel, > > On 04/17/2014 02:28 PM, Ezequiel Garcia wrote: > > Currently stk1160_read_reg() uses a stack-allocated char to get the > > read control value. This is wrong because usb_control_msg() requires > > a kmalloc-ed buffer. > > > > This commit f

Re: [PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-05-09 Thread Hans Verkuil
Hi Ezequiel, On 04/17/2014 02:28 PM, Ezequiel Garcia wrote: > Currently stk1160_read_reg() uses a stack-allocated char to get the > read control value. This is wrong because usb_control_msg() requires > a kmalloc-ed buffer. > > This commit fixes such issue by kmalloc'ating a 1-byte buffer to rece

Re: [PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-04-28 Thread Sander Eikelenboom
Friday, April 25, 2014, 11:51:53 PM, you wrote: > On Apr 17, Ezequiel Garcia wrote: >> Currently stk1160_read_reg() uses a stack-allocated char to get the >> read control value. This is wrong because usb_control_msg() requires >> a kmalloc-ed buffer. >> >> This commit fixes such issue by kmalloc

Re: [PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-04-25 Thread Ezequiel Garcia
On Apr 17, Ezequiel Garcia wrote: > Currently stk1160_read_reg() uses a stack-allocated char to get the > read control value. This is wrong because usb_control_msg() requires > a kmalloc-ed buffer. > > This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive > the read value. > >

[PATCH v2] media: stk1160: Avoid stack-allocated buffer for control URBs

2014-04-17 Thread Ezequiel Garcia
Currently stk1160_read_reg() uses a stack-allocated char to get the read control value. This is wrong because usb_control_msg() requires a kmalloc-ed buffer. This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive the read value. While here, let's remove the urb_buf array which w