[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 4 Apr 2012 22:22:27 +0900
From: Kusanagi Kouichi <slash@...auone-net.jp>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, Pavel Emelyanov <xemul@...allels.com>,
linux-kernel@...r.kernel.org
Subject: Re: Commit 8ef874bfc7296fa206eea2ad1e8a426f576bf6f6 has broken ss
command
On 2012-04-04 12:21:17 +0200, Eric Dumazet wrote:
> Please try this patch :
>
> diff --git a/misc/ss.c b/misc/ss.c
> index 5414f75..8c00760 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -1534,8 +1534,10 @@ static int tcp_show_netlink(struct filter *f, FILE *dump_fp, int socktype)
> .msg_iovlen = f->f ? 3 : 1,
> };
>
> - if (sendmsg(fd, &msg, 0) < 0)
> + if (sendmsg(fd, &msg, 0) < 0) {
> + close(fd);
> return -1;
> + }
>
> iov[0] = (struct iovec){
> .iov_base = buf,
> @@ -1589,6 +1591,10 @@ static int tcp_show_netlink(struct filter *f, FILE *dump_fp, int socktype)
> fprintf(stderr, "ERROR truncated\n");
> } else {
> errno = -err->error;
> + if (errno == EOPNOTSUPP) {
> + close(fd);
> + return -1;
> + }
> perror("TCPDIAG answers");
> }
> close(fd);
This patch solved the problem. Thank you!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists