]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dw2102: don't do DMA on stack
authorJonathan McDowell <noodles@earth.li>
Wed, 15 Feb 2017 20:29:15 +0000 (18:29 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Mar 2017 11:18:39 +0000 (19:18 +0800)
commitbe20197df07db889c8825ce99fa2ee700894e91c
treebff585bd229f080b37110f0547f83d81b83478af
parent7399dec22e729305ac7597bf3950492ce8f97c24
dw2102: don't do DMA on stack

commit 606142af57dad981b78707234cfbd15f9f7b7125 upstream.

On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().

Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with them.

The device was non-functional as a result.

So, switch this driver over to use a buffer within the device state
structure, as has been done with other DVB-USB drivers.

Tested with TechnoTrend TT-connect S2-4600.

[mchehab@osg.samsung.com: fixed a warning at su3000_i2c_transfer() that
 state var were dereferenced before check 'd']
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/dvb-usb/dw2102.c