[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZOXFBzRO98sL5xeV@dwarf.suse.cz>
Date: Wed, 23 Aug 2023 10:36:23 +0200
From: Jiri Bohac <jbohac@...e.cz>
To: Alex Henrie <alexhenrie24@...il.com>
Cc: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
benoit.boissinot@...-lyon.org, davem@...emloft.net,
hideaki.yoshifuji@...aclelinux.com, dsahern@...nel.org
Subject: Re: [PATCH] ipv6/addrconf: clamp preferred_lft to the minimum
instead of erroring
On Tue, Aug 22, 2023 at 09:41:37PM -0600, Alex Henrie wrote:
> "Fixes: eac55bf97094f6b64116426864cf4666ef7587bc", correct?
>
> > On Sun, 2023-08-20 at 19:11 -0600, Alex Henrie wrote:
>
> > > @@ -1368,7 +1368,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block)
> > > * idev->desync_factor if it's larger
> > > */
> > > cnf_temp_preferred_lft = READ_ONCE(idev->cnf.temp_prefered_lft);
> > > - max_desync_factor = min_t(__u32,
> > > + max_desync_factor = min_t(__s64,
> > > idev->cnf.max_desync_factor,
> > > cnf_temp_preferred_lft - regen_advance);
> >
> > It would be better if you describe in the commit message your above
> > fix.
>
> I did mention the underflow problem in the commit message. When I
> split the patch into two patches, it will be even more prominent. What
> more would you like the commit message to say?
>
> > Also possibly using 'long' as the target type (same as
> > 'max_desync_factor') would be more clear.
>
> OK, will change in v2.
This part looks good to me. Sorry for introducing the bug and
thanks for finding it!
--
Jiri Bohac <jbohac@...e.cz>
SUSE Labs, Prague, Czechia
Powered by blists - more mailing lists