aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorPeter Osterlund <petero2@telia.com>2005-11-13 19:06:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:11 -0500
commitae7642bb05623988d8ca82b332dad1ed7bdb8ceb (patch)
tree43c1c2f9c8144f8c8ac2974f878fdc448693c4f5 /drivers/block
parent5563e77078d85c4f107a0a673500c43ce57cf702 (diff)
[PATCH] packet writing oops fix
There is an old bug in the pkt_count_states() function that causes stack corruption. When compiling with gcc 3.x or 2.x it is harmless, but gcc 4 allocates local variables differently, which makes the bug visible. Signed-off-by: Peter Osterlund <petero2@telia.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/pktcdvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 59e5982a5db3..c0233efabeba 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1188,7 +1188,7 @@ static void pkt_count_states(struct pktcdvd_device *pd, int *states)
1188 struct packet_data *pkt; 1188 struct packet_data *pkt;
1189 int i; 1189 int i;
1190 1190
1191 for (i = 0; i <= PACKET_NUM_STATES; i++) 1191 for (i = 0; i < PACKET_NUM_STATES; i++)
1192 states[i] = 0; 1192 states[i] = 0;
1193 1193
1194 spin_lock(&pd->cdrw.active_list_lock); 1194 spin_lock(&pd->cdrw.active_list_lock);