diff options
author | Philip J Kelleher <pjk1939@linux.vnet.ibm.com> | 2013-03-25 19:22:31 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-25 19:22:31 -0600 |
commit | d8d595dfce7925627de78b9eecc8598a6ffda610 (patch) | |
tree | 84a86928d0585ee36f6e575186336a174e028141 /drivers/block | |
parent | f2fc7d0eddf86b0233faa34aa5af6780ea48bc08 (diff) | |
download | linux-3.10-d8d595dfce7925627de78b9eecc8598a6ffda610.tar.gz linux-3.10-d8d595dfce7925627de78b9eecc8598a6ffda610.tar.bz2 linux-3.10-d8d595dfce7925627de78b9eecc8598a6ffda610.zip |
block: removes dynamic allocation on stack
This patch removes dynamic allocation on the stack error.
Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rsxx/dma.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/rsxx/dma.c b/drivers/block/rsxx/dma.c index d523e9c5657..95047e111a3 100644 --- a/drivers/block/rsxx/dma.c +++ b/drivers/block/rsxx/dma.c @@ -986,7 +986,10 @@ void rsxx_eeh_save_issued_dmas(struct rsxx_cardinfo *card) int j; int cnt; struct rsxx_dma *dma; - struct list_head issued_dmas[card->n_targets]; + struct list_head *issued_dmas; + + issued_dmas = kzalloc(sizeof(*issued_dmas) * card->n_targets, + GFP_KERNEL); for (i = 0; i < card->n_targets; i++) { INIT_LIST_HEAD(&issued_dmas[i]); @@ -1025,6 +1028,8 @@ void rsxx_eeh_save_issued_dmas(struct rsxx_cardinfo *card) } spin_unlock(&card->ctrl[i].queue_lock); } + + kfree(issued_dmas); } void rsxx_eeh_cancel_dmas(struct rsxx_cardinfo *card) |