]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cxusb: Use a dma capable buffer also for reading
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sun, 5 Feb 2017 14:57:59 +0000 (12:57 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Apr 2017 07:32:42 +0000 (09:32 +0200)
commite0116f4d9a9ad5112d315b236c7b3d7036d404d7
treea9c9bc754f9d4f14e61b81f86f77d3674a3cf5e4
parentb1bfb5083bfa79d1400009ac6265bfb5f2c09ec9
cxusb: Use a dma capable buffer also for reading

commit 3f190e3aec212fc8c61e202c51400afa7384d4bc upstream.

Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.

As dvb_usb_generic_rw handles a read length of 0 by itself, avoid calling
it using the dvb_usb_generic_read wrapper function.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/dvb-usb/cxusb.c