Author: simon Date: 2010-06-05 19:47:28 +0200 (Sat, 05 Jun 2010) New Revision: 1689
Modified: trunk/batman-adv-kernelland/icmp_socket.c Log: batman-adv: return -EFAULT on copy_to_user errors
copy_to_user() returns the number of bites remaining but we want to return a negative error code here.
Signed-off-by: Dan Carpenter error27@gmail.com [sven.eckelmann@gmx.de: Move change from device.c to icmp_socket.c] Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Modified: trunk/batman-adv-kernelland/icmp_socket.c =================================================================== --- trunk/batman-adv-kernelland/icmp_socket.c 2010-06-05 17:42:40 UTC (rev 1688) +++ trunk/batman-adv-kernelland/icmp_socket.c 2010-06-05 17:47:28 UTC (rev 1689) @@ -148,7 +148,7 @@ kfree(socket_packet);
if (error) - return error; + return -EFAULT;
return packet_len; }