Re: [patch] 2.4.0-test6-pre8: Magic SysRq fixes for serial.c

From: Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Date: Wed Aug 09 2000 - 07:33:01 EST


On Wed, 9 Aug 2000, Philipp Rumpf wrote:

> > It appears that someone else's fixes for magic SysRq went into
> > 2.4.0-test6-pre*. That's obviously fine, but one hunk of my patch I've
> > sent you recently should still be applied. Without the hunk, the 8250
> > serial console driver still ignores the setting of sysrq_enabled and works
> > as if it was enabled all the time.
>
> That's just not true. handle_sysrq now exits without action if
> sysrq_enabled == 0. In fact the only reason it's a global variable is
> because sysctl requires it - hopefully that will be fixed in 2.5 (ELF
> section based sysctl).

 That doesn't mean serial.c doesn't handle it. If handle_sysrq() exits
without an action, then serial.c just drops the just received character
(if any) on the floor and also the next one provided it arrived in the
SysRq recognition interval. So it needs to be fixed anyway.

> > Following is the hunk extracted from my patch. It applies cleanly.
>
> But it doesn't compile, does it ? (there should be no visible definition
> for sysrq_enabled in serial.c)

 Ugh, I admit I haven't actually checked it even though I should have to.
But this poses a problem in serial.c (and possibly other serial drivers,
too) -- it needs to check if SysRq is enabled even before calling
handle_sysrq(). Otherwise the character immediately preceding the BREAK
condition gets lost for no reason. When handle_sysrq() gets finally
called, it's already too late -- the chacter have already been lost.

 I don't think it's feasible to introduce sysrq_enabled() function or
alike now that the variable is to be local.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

- 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/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:18 EST