lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1299307604.2758.67.camel@edumazet-laptop>
Date:	Sat, 05 Mar 2011 07:46:44 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] ipv4: Get peer more cheaply in rt_init_metrics().

Le vendredi 04 mars 2011 à 21:26 -0800, David Miller  écrit :
> We know this is a new route object, so doing atomics and
> stuff makes no sense at all.
> 
> Signed-off-by: David S. Miller <davem@...emloft.net>
> ---
>  net/ipv4/route.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 6c87403..9794a2c 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1759,9 +1759,9 @@ static void rt_init_metrics(struct rtable *rt, struct fib_info *fi)
>  	if (rt->fl.flags & FLOWI_FLAG_PRECOW_METRICS)
>  		create = 1;
>  
> -	rt_bind_peer(rt, create);
> -	peer = rt->peer;
> +	rt->peer = peer = inet_getpeer_v4(rt->rt_dst, create);
>  	if (peer) {
> +		rt->rt_peer_genid = rt_peer_genid();
>  		if (inet_metrics_new(peer))
>  			memcpy(peer->metrics, fi->fib_metrics,
>  			       sizeof(u32) * RTAX_MAX);

Reviewed-by: Eric Dumazet <eric.dumazet@...il.com>


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ