[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1257372051.24051.8.camel@Joe-Laptop.home>
Date: Wed, 04 Nov 2009 14:00:51 -0800
From: Joe Perches <joe@...ches.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next-2.6] ip_frag:
On Wed, 2009-11-04 at 22:54 +0100, Eric Dumazet wrote:
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
> index 575f9bd..93e50d0 100644
> --- a/net/ipv4/ip_fragment.c
> +++ b/net/ipv4/ip_fragment.c
> @@ -206,10 +206,10 @@ static void ip_expire(unsigned long arg)
> struct sk_buff *head = qp->q.fragments;
>
> /* Send an ICMP "Fragment Reassembly Timeout" message. */
> - if ((head->dev = dev_get_by_index(net, qp->iif)) != NULL) {
> + rcu_read_lock();
> + if ((head->dev = dev_get_by_index_rcu(net, qp->iif)) != NULL)
> icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0);
> - dev_put(head->dev);
> - }
> + rcu_read_unlock();
> }
Hi Eric. If you're going to do more of these, could you please
convert them to the more standard kernel style as well?
var = func(foo);
if (var) {
etc...
--
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