[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.11.1410062201140.2258@ja.home.ssi.bg>
Date: Mon, 6 Oct 2014 22:13:07 +0300 (EEST)
From: Julian Anastasov <ja@....bg>
To: Alex Gartrell <agartrell@...com>
cc: horms@...ge.net.au, dan.carpenter@...cle.com,
lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
kernel-team@...com
Subject: Re: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code
Hello,
On Mon, 6 Oct 2014, Alex Gartrell wrote:
> Hey Julian,
>
> I've sent an updated patch that does this but I have some questions about
> other stuff that I find mildly confusing. Specifically I didn't realize until
> looking at the call sites that !dest || daddr = dest->addr.ip (but maybe I'm
> wrong?)
>
> If that's the case, why do we have the following line in __ip_vs_get_out_rt?
>
> daddr = dest->addr.ip;
Extra line that is not needed...
> If that's /always/ true then we should add the following line or a comment to
> the same effect to clarify
>
> BUG_ON(dest && dest->addr.ip != daddr);
IMHO, BUG_ON is not needed.
> If that's not intended to always be true, then should the patch be the
> following?
>
> ...%pI4", dest ? &dest->addr.ip : &daddr);
Using daddr is fine.
Regards
--
Julian Anastasov <ja@....bg>
--
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