summaryrefslogtreecommitdiff
path: root/drivers/scsi/ipr.h
diff options
context:
space:
mode:
authorwenxiong@linux.vnet.ibm.com <wenxiong@linux.vnet.ibm.com>2013-03-14 22:52:25 +0400
committerJames Bottomley <JBottomley@Parallels.com>2013-05-13 02:07:42 +0400
commit222ab5946860e1d77870ffbfebebff2bcb1f4215 (patch)
tree6ed646b1b53667ad098a6440333543ca114019bb /drivers/scsi/ipr.h
parent364398324c901bc834f762eb5443d2e5a1d2a0db (diff)
downloadlinux-222ab5946860e1d77870ffbfebebff2bcb1f4215.tar.xz
[SCSI] ipr: Avoid target_destroy accessing memory after it was freed
Defined target_ids,array_ids and vsets_ids as unsigned long to avoid target_destroy accessing memory after it was freed. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r--drivers/scsi/ipr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index a1fb840596ef..07a85ce41782 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1440,9 +1440,9 @@ struct ipr_ioa_cfg {
/*
* Bitmaps for SIS64 generated target values
*/
- unsigned long *target_ids;
- unsigned long *array_ids;
- unsigned long *vset_ids;
+ unsigned long target_ids[BITS_TO_LONGS(IPR_MAX_SIS64_DEVS)];
+ unsigned long array_ids[BITS_TO_LONGS(IPR_MAX_SIS64_DEVS)];
+ unsigned long vset_ids[BITS_TO_LONGS(IPR_MAX_SIS64_DEVS)];
u16 type; /* CCIN of the card */