[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100720.234116.184416997.davem@davemloft.net>
Date: Tue, 20 Jul 2010 23:41:16 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: nicolas.dichtel@...nd.com, netdev@...r.kernel.org
Subject: Re: [RFC PATCH] dst: check if dst is freed in dst_check()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Wed, 21 Jul 2010 04:28:08 +0200
> Le mardi 20 juillet 2010 à 11:49 +0200, Nicolas Dichtel a écrit :
>> diff --git a/include/net/dst.h b/include/net/dst.h
>> index 81d1413..7bf4f9a 100644
>> --- a/include/net/dst.h
>> +++ b/include/net/dst.h
>> @@ -319,6 +319,8 @@ static inline int dst_input(struct sk_buff *skb)
>>
>> static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)
>> {
>> + if (dst->obsolete > 1)
>> + return NULL;
>> if (dst->obsolete)
>> dst = dst->ops->check(dst, cookie);
>> return dst;
>
> I believe this is not needed and redundant.
>
> In what case do you think this matters ?
>
> To my knowledge dst_check() is only used by net/xfrm/xfrm_policy.c
>
> And xfrm_dst_check() does the necessary checks.
Right, last time I was snooping around in here I came to the
same conclusion. In fact I think I'm the author of that
enormous comment in xfrm_dst_check(). :-)
--
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