Commit 9d252c21 authored by David Jeffery's avatar David Jeffery Committed by Linus Torvalds

[PATCH] ips driver 1/4: fix struct length and remove dead code

This small patch fixes the length of the IPS_ENQ
struct.  It was too short which can cause the adapter
to write beyond the the end of the struct during
driver initialization and corrupt part of memory.
parent bd15d114
...@@ -1155,13 +1155,6 @@ ips_queue(Scsi_Cmnd *SC, void (*done) (Scsi_Cmnd *)) { ...@@ -1155,13 +1155,6 @@ ips_queue(Scsi_Cmnd *SC, void (*done) (Scsi_Cmnd *)) {
ips_next(ha, IPS_INTR_IORL); ips_next(ha, IPS_INTR_IORL);
/* If We were using the CD Boot Flash Buffer, Restore the Old Values */
if ( ips_FlashData == ha->ioctl_data ) {
ha->ioctl_data = ha->flash_data;
ha->ioctl_order = ha->flash_order;
ha->ioctl_datasize = ha->flash_datasize;
ips_FlashDataInUse = 0;
}
return (0); return (0);
} }
......
...@@ -714,7 +714,7 @@ typedef struct { ...@@ -714,7 +714,7 @@ typedef struct {
uint16_t usConfigUpdateCount; uint16_t usConfigUpdateCount;
uint8_t ucBlkFlag; uint8_t ucBlkFlag;
uint8_t reserved; uint8_t reserved;
uint16_t usAddrDeadDisk[IPS_MAX_CHANNELS * IPS_MAX_TARGETS]; uint16_t usAddrDeadDisk[IPS_MAX_CHANNELS * (IPS_MAX_TARGETS + 1)];
} IPS_ENQ, *PIPS_ENQ; } IPS_ENQ, *PIPS_ENQ;
typedef struct { typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment