fix alpha atkbd oops
PATCH 1/1 fix alpha atkbd oops
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.
===================================================================
[email protected], 2002-10-10 17:28:04-07:00, [email protected]
Avoid oops on systems that set atkbd_reset.
atkbd.c | 5 +++-- 1 files changed, 3 insertions, 2 deletions
drivers/input/keyboard/atkbd.c +3 -2
@@ -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;%/_EA16&!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&MZ594*Y</'_OXV'@V9E_HJI`P,XL.JD66WN-S]D0HQD+WPT%<' :C[^PJE;5C>N:*::+;"091]\!UPXWQ2L%````
`
end
Vojtech Pavlik
AppliedQuoted 11 lines · Richard Henderson
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_commandseems 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.
Thanks, applied.
Signature · 2 lines
Vojtech Pavlik SuSE Labs