* [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
@ 2014-09-25 0:07 Cong Wang
2014-09-25 15:35 ` Alexei Starovoitov
2014-09-28 21:16 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Cong Wang @ 2014-09-25 0:07 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, David S. Miller
Fixes: commit f187bc6efb7250afee0e2009b6106 ("ipv4: No need to set generic neighbour pointer")
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 173e7ea..cbadb94 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -746,7 +746,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
}
n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw);
- if (n) {
+ if (!IS_ERR(n)) {
if (!(n->nud_state & NUD_VALID)) {
neigh_event_send(n, NULL);
} else {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
2014-09-25 0:07 [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup() Cong Wang
@ 2014-09-25 15:35 ` Alexei Starovoitov
2014-09-25 16:18 ` Cong Wang
2014-09-28 21:16 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Alexei Starovoitov @ 2014-09-25 15:35 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev@vger.kernel.org, David S. Miller
On Wed, Sep 24, 2014 at 5:07 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> Fixes: commit f187bc6efb7250afee0e2009b6106 ("ipv4: No need to set generic neighbour pointer")
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
> net/ipv4/route.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 173e7ea..cbadb94 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -746,7 +746,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
> }
>
> n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw);
> - if (n) {
> + if (!IS_ERR(n)) {
> if (!(n->nud_state & NUD_VALID)) {
> neigh_event_send(n, NULL);
assuming symptoms of this was a crash?
Could you share the stack trace to see how we got to this state ?
Or was it spotted just by code inspection?
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
2014-09-25 0:07 [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup() Cong Wang
2014-09-25 15:35 ` Alexei Starovoitov
@ 2014-09-28 21:16 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2014-09-28 21:16 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 24 Sep 2014 17:07:53 -0700
> Fixes: commit f187bc6efb7250afee0e2009b6106 ("ipv4: No need to set generic neighbour pointer")
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-28 21:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 0:07 [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup() Cong Wang
2014-09-25 15:35 ` Alexei Starovoitov
2014-09-25 16:18 ` Cong Wang
2014-09-28 21:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox