diff options
author | Eli Billauer <eli.billauer@gmail.com> | 2015-03-27 09:56:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-03 16:15:30 +0200 |
commit | 127af8828518074ab24e9b5678229513d198d832 (patch) | |
tree | a90aa2b61478e17ea53de4caba0874d13cf87b31 /init | |
parent | mic: drop pci_msi_off call on probe (diff) | |
download | linux-127af8828518074ab24e9b5678229513d198d832.tar.xz linux-127af8828518074ab24e9b5678229513d198d832.zip |
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>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions