[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100628.212241.245398923.davem@davemloft.net>
Date: Mon, 28 Jun 2010 21:22:41 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: mathieu.lacage@...hia.inria.fr, netdev@...r.kernel.org
Subject: Re: PATCH: uninitialized memory access in tcp_parse_options
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Sat, 26 Jun 2010 07:58:04 +0200
> If you want to avoid valgrind false positive at this point, without
> introducing bug for other tcp_parse_options() callers, a better fix
> would be following patch.
>
> Thanks
>
> diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
> index 794c2e1..4e758ac 100644
> --- a/net/ipv4/tcp_minisocks.c
> +++ b/net/ipv4/tcp_minisocks.c
> @@ -520,14 +520,13 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
> struct request_sock *req,
> struct request_sock **prev)
> {
> - struct tcp_options_received tmp_opt;
> + struct tcp_options_received tmp_opt = {0};
> u8 *hash_location;
> struct sock *child;
That's a 28 byte memset() in the connect fast-path. We shouldn't eat this
just to placate a valgrind miscue. :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists