Thread (4 messages) flat view 4 messages, 2 authors, 2014-10-06

Re: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code

From: Julian Anastasov <ja@ssi.bg>
Date: 2014-10-06 19:13:07
Also in: lvs-devel

Possibly related (same subject, not in this thread)

	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 [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help