]> git.baikalelectronics.ru Git - kernel.git/commit
via-cuda: Prevent read buffer overflow
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 1 Jan 2017 00:56:26 +0000 (19:56 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Feb 2017 05:56:19 +0000 (16:56 +1100)
commit57947d2a4204c9b403411c2f07f3de8f8dc48386
tree508e70bc6bc1e696ce0dc7143920ec97e49b929a
parenta4eb1a1104fa3526d076f1d8e74529899a954b44
via-cuda: Prevent read buffer overflow

If the Cuda driver does not enter the 'read_done' state for some
reason, it may continue in the 'reading' state until the buffer
overflows. Add a bounds check to prevent this.

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/macintosh/via-cuda.c