[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA42JLYGOR1hJnOvdvSbyK6z7wb0jG8TtXsXoNZU9xnK1cKjVA@mail.gmail.com>
Date: Fri, 8 Jun 2018 19:54:30 -0700
From: Dexuan-Linux Cui <dexuan.linux@...il.com>
To: David Ahern <dsahern@...il.com>
Cc: valdis.kletnieks@...edu, netdev@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dexuan Cui <decui@...rosoft.com>
Subject: Re: next-20180605 - BUG in ipv6_add_addr
On Thu, Jun 7, 2018 at 5:51 PM, David Ahern <dsahern@...il.com> wrote:
>
> ...
> I know you don't have a reliable reproducer, but I did find one spot
> where I was too clever and did not initialize a new cfg variable:
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 89019bf59f46..59c22a25e654 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -1324,6 +1324,7 @@ static int ipv6_create_tempaddr(struct
> inet6_ifaddr *ifp,
> }
> }
>
> + memset(&cfg, 0, sizeof(cfg));
> cfg.valid_lft = min_t(__u32, ifp->valid_lft,
> idev->cnf.temp_valid_lft + age);
> cfg.preferred_lft = cnf_temp_preferred_lft + age -
> idev->desync_factor;
This works for me. Great!
Thanks,
-- Dexuan
Powered by blists - more mailing lists