summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-10-27 11:35:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-12 13:17:07 +0100
commita6af69768d5cb4b2528946d53be5fa19ade37723 (patch)
tree7a4d5cb798966f00a2c901e794177847b4c2c36b /include/linux
parent156ce5bb6cc43a80a743810199defb1dc3f55b7f (diff)
comedi: dt9812: fix DMA buffers on stack
commit 536de747bc48262225889a533db6650731ab25d3 upstream. USB transfer buffers are typically mapped for DMA and must not be allocated on the stack or transfers will fail. Allocate proper transfer buffers in the various command helpers and return an error on short transfers instead of acting on random stack data. Note that this also fixes a stack info leak on systems where DMA is not used as 32 bytes are always sent to the device regardless of how short the command is. Fixes: 63274cd7d38a ("Staging: comedi: add usb dt9812 driver") Cc: stable@vger.kernel.org # 2.6.29 Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20211027093529.30896-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions