[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358519314.11051.111.camel@edumazet-glaptop>
Date: Fri, 18 Jan 2013 06:28:34 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] ipv6: Fix addrconf_dst_alloc() failure check.
On Fri, 2013-01-18 at 20:56 +0900, YOSHIFUJI Hideaki wrote:
> The function returns NULL on error and it never return error code
> embedded in pointer.
>
Which functions returns NULL ?
addrconf_dst_alloc() returns ERR_PTR(-ENOMEM) in case of error in my net
tree.
Also, please consider adding the bug origin in your changelogs.
Thanks !
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
> ---
> net/ipv6/addrconf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 420e563..d0a2df2b 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -783,8 +783,8 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
> }
>
> rt = addrconf_dst_alloc(idev, addr, false);
> - if (IS_ERR(rt)) {
> - err = PTR_ERR(rt);
> + if (!rt) {
> + err = -ENOMEM;
> goto out;
> }
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists