All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] fix alpha atkbd oops
@ 2002-10-11  0:34 Richard Henderson
  2002-10-11  9:54 ` Vojtech Pavlik
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2002-10-11  0:34 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: torvalds, linux-kernel

When called from 

        if (atkbd_reset)
                if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT))

in atkbd_probe, we'll crash trying to write back the results
into the null pointer.

The interface to atkbd_command seems more sensible to allow
a null pointer to indicate that the caller doesn't care about
the received data than to supply a dummy pointer here.


r~


You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


ChangeSet@1.738, 2002-10-10 17:28:04-07:00, rth@dot.sfbay.redhat.com
  Avoid oops on systems that set atkbd_reset.


 atkbd.c |    5 +++--
 1 files changed, 3 insertions, 2 deletions


diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
--- a/drivers/input/keyboard/atkbd.c	Thu Oct 10 17:29:28 2002
+++ b/drivers/input/keyboard/atkbd.c	Thu Oct 10 17:29:28 2002
@@ -244,8 +244,9 @@
 
 	while (atkbd->cmdcnt && timeout--) udelay(10);
 
-	for (i = 0; i < receive; i++)
-		param[i] = atkbd->cmdbuf[(receive - 1) - i];
+	if (param)
+		for (i = 0; i < receive; i++)
+			param[i] = atkbd->cmdbuf[(receive - 1) - i];
 
 	if (atkbd->cmdcnt) 
 		return (atkbd->cmdcnt = 0) - 1;

===================================================================


This BitKeeper patch contains the following changesets:
+
## Wrapped with gzip_uu ##


begin 664 bkpatch1691
M'XL(`&@;ICT``[5474_;,!1]CG_%E7@!H23^2M.&%<%@8M,F477B":')B5WB
MT<25[10ZY<?/#1-HTQAL&HD5);[7YYY[SU%VX,(I6T36UV@'WAOGBT@:G[A%
M*3:)5;(6/JE,$X)S8T(P#=&T%.UU&HZD2]UV=ZFX6\4TR5!(F@E?U;!6UA41
M2=C#CM^L5!'-WYU=?#J>(S2=PDD=0-1GY6$Z1=[8M5A*=R1\O31MXJUH7:.\
MV-;N'U)[BC$-=T9RAK-13T:8YWU%)"&"$R4QY>,11X'9T>^:^`6(8((Q)CEG
M/6$3EJ%3($G.QH!I2G!80/*"C@O,8YP7&,-3N+!/(,;H+?S?-DY0!<=KHR48
MLW)@6G`;YU7CP(?"X,+HA+\IY1>KPGN"/@+A.>=H]CA;%/_EA1`6&!W"VGSU
MJJJ/_*U>ZNO:)UUUFU3?>FGU5MQ4MZO.IS=J4QIA93KP2*K[QG+,",-CCGLR
M&1/2EZ6<*(J5)&PTR=F38WP)>-`LB$;SC/:<XM%DL-*?SVW]]8KM/&"[SJD7
M8H86)B0HG^&>$S)F@_-H]K/Q\B*CSQJ/04Q?Q7CGC0X6"[@*=.L-K(05#>@%
MA&WMH.V6RZWC[D4XA]C>#BLX:/:,'O_@R5/*<Z#H0Z`'#$6!Q>[`9P]%T<)8
MV-4P!7P`&MZ`594*Y</'_OXV'@V9E_HJI`P,XL.JD66WN-S]D0HQD+WPT%<'
:C[^PJE;5C>N:*::+;"091]\!UPXWQ2L%````
`
end

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-11  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-11  0:34 [patch] fix alpha atkbd oops Richard Henderson
2002-10-11  9:54 ` Vojtech Pavlik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.