netdev
[Top] [All Lists]

Re: [IPV6] Close small race in ip6_del_rt

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [IPV6] Close small race in ip6_del_rt
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 9 Nov 2004 21:38:19 -0800
Cc: yoshfuji@xxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20041106103449.GA18569@gondor.apana.org.au>
References: <20041106103449.GA18569@gondor.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 6 Nov 2004 21:34:49 +1100
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> There is a small SMP race in ip6_del_rt where we maybe dereferencing a dst
> that has been freed.  This patch fixes it.

Looks good, applied.  Thanks.

There are certain routines, such as fib6_add() and fib_del()
for which it would be nice to have dst/rt refcounting
descriptions in comments.  Then we could:

1) Verify they actually provide that behavior.
2) Make sure callers handle this behavior properly.

I mention this because I had to read the entirety of
fib6_add() to verify some dst refcounting code paths
in the ipv6 stack last week.

<Prev in Thread] Current Thread [Next in Thread>