diff options
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 205e2000d395..7dd7baf2a5ad 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c | |||
@@ -609,15 +609,15 @@ int ping_getfrag(void *from, char *to, | |||
609 | fraglen -= sizeof(struct icmphdr); | 609 | fraglen -= sizeof(struct icmphdr); |
610 | if (fraglen < 0) | 610 | if (fraglen < 0) |
611 | BUG(); | 611 | BUG(); |
612 | if (csum_and_copy_from_iter(to + sizeof(struct icmphdr), | 612 | if (!csum_and_copy_from_iter_full(to + sizeof(struct icmphdr), |
613 | fraglen, &pfh->wcheck, | 613 | fraglen, &pfh->wcheck, |
614 | &pfh->msg->msg_iter) != fraglen) | 614 | &pfh->msg->msg_iter)) |
615 | return -EFAULT; | 615 | return -EFAULT; |
616 | } else if (offset < sizeof(struct icmphdr)) { | 616 | } else if (offset < sizeof(struct icmphdr)) { |
617 | BUG(); | 617 | BUG(); |
618 | } else { | 618 | } else { |
619 | if (csum_and_copy_from_iter(to, fraglen, &pfh->wcheck, | 619 | if (!csum_and_copy_from_iter_full(to, fraglen, &pfh->wcheck, |
620 | &pfh->msg->msg_iter) != fraglen) | 620 | &pfh->msg->msg_iter)) |
621 | return -EFAULT; | 621 | return -EFAULT; |
622 | } | 622 | } |
623 | 623 | ||