Re: Status new-modules + 802.11b/IrDA

Andrew Morton
2002-12-12T00:43:31Z

Rusty Russell wrote:
>
> In message <20021211174305.GB11264@bougret.hpl.hp.com> you write:
> > On Wed, Dec 11, 2002 at 07:34:53PM +1100, Rusty Russell wrote:
> > > > o removal of airo_cs : "Uninitialised timer!/nThis is a
> > > > warning. Your computer is OK". Call trace on demand. Also, the module
> > > > airo not removed (probably due to problem with airo_cs).
> > >
> > > That, in itself, should be harmless.
> >
> > Yes, but this is new and I don't really like it. I suspect
> > something is wrong in the Pcmcia code itself. Last I tried was 2.5.46
> > and I see some suspicious init_timer() added where I would not expect,
> > and some missing where they would be needed.
> > Hum... Who is in charge ?
>
> Well, Andrew Morton made the change that required timers to be
> initialized, and the check which locates ones which are not. As to
> who is responsible for airo_cs, I'm guessing Ben Reed, as author.

wakes up.

> > I personally believe the timer thingy is important and cause
> > of problems.
>
> I disagree: the warning is supposed to silently fix it up.
>

yes. It goes like this:

1: The new super-scalable SMP timers code had a locking problem which
made 8-ways go oops.
2: The fix was to add a spinlock to struct timer_list.
3: spinlocks need to be initialised.
3a: struct timer_list needs to be initialised.

This is a problem, because it has traditionally been the case that
an all-zeroes struct timer_list is "initialised". That is no longer
the case. All timers must now be prepared with init_timer() or
TIMER_INITIALIZER()

So debugging code was added to the timer layer to detect when someone
passes an uninitialised timer into the core timer functions. That debug
code generates a warning, a backtrace and then initialises the timer
for you, so things run happily.

I did an audit and fixed up probably a hundred or so uninitialised timers,
but there will be a few leftovers.

The intent is that people will report these leftovers, they get fixed up
and then one day we pull out the debug code.