Re: [PATCH] APM 2.0.35 and 2.1.120 (was: Fix for oops at system halt)

Jan Echternach (echter@informatik.uni-rostock.de)
Wed, 9 Sep 1998 19:07:58 +0200


On Wed, Sep 09, 1998 at 05:45:43PM +0100, Alan Cox wrote:
> It was simple and obviously correct thats all

Um. I've just noticed that it is not correct. apm_set_power_state()
is called from many different locations, including do_apm_timer().
apm_bios_init() enables the timer before it sets apm_enabled. This
opens a race condition.

With this background, I have to argue that your patch isn't simple
either, because it changes the semantics of apm_set_power_state(),
causing an unknown number of side effects. The mere number of
changed lines doesn't count.

Please use the cleanest patch available (which is Stephen's patch),
as long as it is simple enough for 2.0.X. This will prevent many
pitfalls like this.

-- 
Jan

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/faq.html