Subject: Re: [PATCH 2/2] route: Remove redirect_genid

From: Steffen Klassert <[email-masked]>
Date: Tue, 6 Mar 2012 09:06:22 +0100

On Sun, Mar 04, 2012 at 09:55:05PM -0500, David Miller wrote:
> From: Steffen Klassert <[email-masked]>
> 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!