lkml.org 
[lkml]   [2005]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.14-mm2 OOPS - packet writing
Hi,

Peter Osterlund napisał(a):

>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. Fixed by this patch.
>
>Signed-off-by: Peter Osterlund <petero2@telia.com>
>---
>
> 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 391ced8..b5f67b1 100644
>--- a/drivers/block/pktcdvd.c
>+++ b/drivers/block/pktcdvd.c
>@@ -1188,7 +1188,7 @@ static void pkt_count_states(struct pktc
> 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);
>
>
>
Great thanks, patch fixed problem. Can you send it to Linus?

Regards,
Michal Piotrowski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-12 23:31    [W:0.032 / U:20.332 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site