mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: ipv6: addrconf_f6i_alloc - fix non-null pointer check to !IS_ERR()
Fixes a stupid bug I recently introduced... ip6_route_info_create() returns an ERR_PTR(err) and not a NULL on error. Fixes:d55a2e374a("net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)'") Cc: David Ahern <dsahern@gmail.com> Cc: Lorenzo Colitti <lorenzo@google.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Maciej Żenczykowski <maze@google.com> Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit8652f17c65) Bug: 140201217 Change-Id: I209dbc716a8dab3397d0c4a11ead9ad888793cc4
This commit is contained in:
@@ -4383,7 +4383,7 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net,
|
||||
}
|
||||
|
||||
f6i = ip6_route_info_create(&cfg, gfp_flags, NULL);
|
||||
if (f6i)
|
||||
if (!IS_ERR(f6i))
|
||||
f6i->dst_nocount = true;
|
||||
return f6i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user