netdev
[Top] [All Lists]

Re: tx_timeout and timer serialisation

To: Donald Becker <becker@xxxxxxxxx>
Subject: Re: tx_timeout and timer serialisation
From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
Date: Fri, 19 May 2000 18:06:56 -0400
Cc: Andrew Morton <andrewm@xxxxxxxxxx>, netdev@xxxxxxxxxxx
Organization: MandrakeSoft
References: <Pine.LNX.4.10.10005181020000.1658-100000@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Donald Becker wrote:
> On Fri, 19 May 2000, Andrew Morton wrote:
> > I'll be spending the next <however long it takes> working through the
> > old net drivers.  One very common theme/bug in these is the pattern:
> >
> > xxx_close()
> > {
> >       ...
> >       del_timer();
> >       release(some_resources);
> >       ...
> > }
> >
> > xxx_timer()
> > {
> >       use(some_resources);
> > }
> 
> I don't see the semantic problem here.
> This was the recommended way to use the timer routines.  If the semantics
> have changed, there should be new names for the changed semantics.

There doesn't seem to be anything in 2.2.x to prevent this sort of race
at del_timer time.  It always seemed to me like a driver-specific wait
queue was needed for certain points in the close() process, like this.

        Jeff



-- 
Jeff Garzik              | Liberty is always dangerous, but
Building 1024            | it is the safest thing we have.
MandrakeSoft, Inc.       |      -- Harry Emerson Fosdick

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