From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: timo.teras@iki.fi, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] route: Remove redirect_genid
Date: Tue, 6 Mar 2012 09:06:22 +0100 [thread overview]
Message-ID: <20120306080622.GE15404@secunet.com> (raw)
In-Reply-To: <20120304.215505.1141896485416671142.davem@davemloft.net>
On Sun, Mar 04, 2012 at 09:55:05PM -0500, David Miller wrote:
> From: Steffen Klassert <steffen.klassert@secunet.com>
> Date: Thu, 1 Mar 2012 07:23:16 +0100
>
> > peer = rt->peer;
> > - if (peer) {
> > - if (peer->redirect_learned.a4 != new_gw ||
> > - peer->redirect_genid != redirect_genid) {
> > - peer->redirect_learned.a4 = new_gw;
> > - peer->redirect_genid = redirect_genid;
> > - atomic_inc(&__rt_peer_genid);
> > - }
> > - check_peer_redir(&rt->dst, peer);
> > + if (peer && peer->redirect_learned.a4 != new_gw) {
> > + peer->redirect_learned.a4 = new_gw;
> > + atomic_inc(&__rt_peer_genid);
> > }
> > + check_peer_redir(&rt->dst, peer);
> > }
>
> If peer is NULL you cannot call check_peer_redir() because it assumes
> that the passed in peer is non-NULL and dereferences it unconditionally.
>
Ugh, indeed. I'll fix it and resend the patchset.
Thanks for the review!
next prev parent reply other threads:[~2012-03-06 8:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 6:21 [PATCH v2 0/2] Fix routing metrics Steffen Klassert
2012-03-01 6:22 ` [PATCH 1/2] inetpeer: Invalidate the inetpeer tree along with the routing cache Steffen Klassert
2012-03-01 6:23 ` [PATCH 2/2] route: Remove redirect_genid Steffen Klassert
2012-03-05 2:55 ` David Miller
2012-03-06 8:06 ` Steffen Klassert [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-07 7:19 [PATCH v3 0/2] Fix routing metrics Steffen Klassert
2012-03-07 7:21 ` [PATCH 2/2] route: Remove redirect_genid Steffen Klassert
2012-03-08 8:31 ` David Miller
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=20120306080622.GE15404@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=timo.teras@iki.fi \
/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.