All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Gartrell <agartrell@fb.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: horms@verge.net.au, dan.carpenter@oracle.com,
	lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	kernel-team@fb.com
Subject: Re: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code
Date: Mon, 6 Oct 2014 08:56:40 -0700	[thread overview]
Message-ID: <5432BBB8.9070206@fb.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1410060940470.1738@ja.home.ssi.bg>

Hey Julian,

On 10/05/2014 11:49 PM, Julian Anastasov wrote:
>
> 	You have to print the "daddr" variable as
> it was done before your patchset in the
> "Stopping traffic to %s address, dest: %p..." message
> because dest is not present in all cases, for example,
> for *bypass_xmit. Other places provide cp->daddr but
> for backup server some conns can live without cp->dest.

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;

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);

If that's not intended to always be true, then should the patch be the 
following?

	...%pI4", dest ? &dest->addr.ip : &daddr);

Thanks,
-- 
Alex Gartrell <agartrell@fb.com>

WARNING: multiple messages have this Message-ID (diff)
From: Alex Gartrell <agartrell@fb.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: <horms@verge.net.au>, <dan.carpenter@oracle.com>,
	<lvs-devel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<kernel-team@fb.com>
Subject: Re: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code
Date: Mon, 6 Oct 2014 08:56:40 -0700	[thread overview]
Message-ID: <5432BBB8.9070206@fb.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1410060940470.1738@ja.home.ssi.bg>

Hey Julian,

On 10/05/2014 11:49 PM, Julian Anastasov wrote:
>
> 	You have to print the "daddr" variable as
> it was done before your patchset in the
> "Stopping traffic to %s address, dest: %p..." message
> because dest is not present in all cases, for example,
> for *bypass_xmit. Other places provide cp->daddr but
> for backup server some conns can live without cp->dest.

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;

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);

If that's not intended to always be true, then should the patch be the 
following?

	...%pI4", dest ? &dest->addr.ip : &daddr);

Thanks,
-- 
Alex Gartrell <agartrell@fb.com>

  reply	other threads:[~2014-10-06 15:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 17:45 ipvs: Pull out crosses_local_route_boundary logic Dan Carpenter
2014-10-01 19:37 ` Julian Anastasov
2014-10-05 23:47   ` Alex Gartrell
2014-10-06  7:32     ` Simon Horman
2014-10-06 15:45       ` Alex Gartrell
2014-10-06 15:46       ` [PATCH net-next] ipvs: Avoid null-pointer deref in debug code Alex Gartrell
2014-10-06 15:46         ` Alex Gartrell
2014-10-06 19:01         ` Julian Anastasov
2014-10-17  6:27           ` Simon Horman
2014-10-06  0:54 ` Alex Gartrell
2014-10-06  0:54   ` Alex Gartrell
2014-10-06  6:49   ` Julian Anastasov
2014-10-06 15:56     ` Alex Gartrell [this message]
2014-10-06 15:56       ` Alex Gartrell
2014-10-06 19:13       ` Julian Anastasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5432BBB8.9070206@fb.com \
    --to=agartrell@fb.com \
    --cc=dan.carpenter@oracle.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=kernel-team@fb.com \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.