[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 01:48:30 +0200
Cc: Andrew Morton <andrewm@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <200006071758.VAA21947@xxxxxxxxxxxxx>; from kuznet@xxxxxxxxxxxxx on Wed, Jun 07, 2000 at 08:00:12PM +0200
References: <393CF7A8.6DDAE578@xxxxxxxxxx> <200006071758.VAA21947@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Wed, Jun 07, 2000 at 08:00:12PM +0200, kuznet@xxxxxxxxxxxxx wrote:
> > +/* REVIEWME: frag_expire() could be running on another CPU now, (if this
> > + * function is called from reasm_frag()).  frag_expire() will be spinning
> > + * on ip6_frag_lock.  Once this function returns to reasm_frag() and
> > + * reasm_frag releases the lock, frag_expire() will run and will
> > + * again call fq_free.  Probably safe, but needs an expert eye :)
> > + */
> > +   del_timer_async(&fq->timer);
> 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. Hmm, probably the locks need to be split (list lock,
frag queue lock protected with del_timer_async + refcount) or maybe even
irq save spinlocks (costly) 

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

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