packet writing oops fix
PATCH 4/23 packet writing oops fix
-stable review patch. If anyone has any objections, please let us know.
------------------
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 <[email protected]>
Cc <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
Signed-off-by Chris Wright <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/block/pktcdvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/pktcdvd.c +1 -1
@@ -1191,7 +1191,7 @@ static void pkt_count_states(struct pktcstruct 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);
--