Skip to content

Commit 0d6a775

Browse files
ij1davem330
authored andcommitted
tcp: in sendmsg/pages open code the real goto target
copied was assigned zero right before the goto, so if (copied) cannot ever be true. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cabeccb commit 0d6a775

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/ipv4/tcp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse
683683

684684
err = -EPIPE;
685685
if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
686-
goto do_error;
686+
goto out_err;
687687

688688
while (psize > 0) {
689689
struct sk_buff *skb = tcp_write_queue_tail(sk);
@@ -854,7 +854,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
854854

855855
err = -EPIPE;
856856
if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
857-
goto do_error;
857+
goto out_err;
858858

859859
while (--iovlen >= 0) {
860860
int seglen = iov->iov_len;

0 commit comments

Comments
 (0)