diff options
author | Peter Osterlund <petero2@telia.com> | 2005-11-13 16:06:36 -0800 |
---|---|---|
committer | Chris Wright <chrisw@osdl.org> | 2005-11-24 14:10:07 -0800 |
commit | 9761be89f5a057bf2bae57ca98990f89ad5edbe2 (patch) | |
tree | 2702a950f05a3c9270f5a976340571629fc35bd2 /drivers | |
parent | d8122124872548142e3df57d274444f484f318a2 (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: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/pktcdvd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index a280e679b1c..a10ee0266e8 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -1191,7 +1191,7 @@ static void pkt_count_states(struct pktcdvd_device *pd, int *states) struct packet_data *pkt; int i; - for (i = 0; i <= PACKET_NUM_STATES; i++) + for (i = 0; i < PACKET_NUM_STATES; i++) states[i] = 0; spin_lock(&pd->cdrw.active_list_lock); |