aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r--net/sunrpc/cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index f21ece088764..de0b0f39d9d8 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -830,6 +830,8 @@ static ssize_t cache_do_downcall(char *kaddr, const char __user *buf,
830{ 830{
831 ssize_t ret; 831 ssize_t ret;
832 832
833 if (count == 0)
834 return -EINVAL;
833 if (copy_from_user(kaddr, buf, count)) 835 if (copy_from_user(kaddr, buf, count))
834 return -EFAULT; 836 return -EFAULT;
835 kaddr[count] = '\0'; 837 kaddr[count] = '\0';