linux_dsm_epyc7002/drivers/char/xillybus
Eli Billauer 127af88285 char: xillybus: Don't return -EFAULT on user-triggered flush
The API allows the application to flush a host-to-FPGA stream by calling
write() with the data count set to zero. Before this patch, copy_from_user()
was called with a non-zero byte count, which possibly made it attempt to read
from unmapped user memory. Such attempts caused the driver to return -EFAULT
instead of 0, even though the desired operation went through fine.

This patch ensures the driver returns 0 on a successful flush.

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 16:15:30 +02:00
..
Kconfig xillybus: Move out of staging 2014-09-23 23:44:16 -07:00
Makefile xillybus: Move out of staging 2014-09-23 23:44:16 -07:00
xillybus_core.c char: xillybus: Don't return -EFAULT on user-triggered flush 2015-04-03 16:15:30 +02:00
xillybus_of.c char: constify of_device_id array 2015-03-16 21:10:28 +01:00
xillybus_pcie.c xillybus: Move out of staging 2014-09-23 23:44:16 -07:00
xillybus.h xillybus: Move out of staging 2014-09-23 23:44:16 -07:00