netdev
[Top] [All Lists]

Re: timers in net/ipv6

To: kuznet@xxxxxxxxxxxxx
Subject: Re: timers in net/ipv6
From: Andi Kleen <ak@xxxxxx>
Date: Thu, 8 Jun 2000 19:44:23 +0200
Cc: Andi Kleen <ak@xxxxxx>, andrewm@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <200006081659.UAA09215@xxxxxxxxxxxxx>; from kuznet@xxxxxxxxxxxxx on Thu, Jun 08, 2000 at 06:59:12PM +0200
References: <20000608014830.A10453@xxxxxxxxxxx> <200006081659.UAA09215@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Thu, Jun 08, 2000 at 06:59:12PM +0200, kuznet@xxxxxxxxxxxxx wrote:
> Hello!
> 
> > > We have already discussed this. It is not safe, certainly,
> > > and needs refcounting.
> > 
> > What I think is a bigger problem is the unsafe use of the spinlock:
> > nothing prevents a timer on the same CPU from bumping into the spinlock,
> > causing a deadlock.
> 
> No dedalock, it causes reference to freed memory rather
> than deadlock.

We no longer have bh protection against timers, so a timer may run
while net_rx_action executes, even on the same CPU.
ipv6_reassembly has ip6_frag_lock, timer tries to aquire it on the same CPU 
-> deadlock. 

> 
> >              Hmm, probably the locks need to be split (list lock,
> > frag queue lock protected with del_timer_async + refcount) or maybe even
> 
> Nothing but refcount on fq. It is very simple and convenient solution.
> 
> Andi, I have already asked you: may I change IPv4/v6 defragmenters?
> I remember, you had some large patches for it.

Please fix it for v2.4. I'll put my changes in for 2.5.


-Andi
-- 
This is like TV. I don't like TV.

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