Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Philip J Kelleher and committed by
Jens Axboe
d8d595df f2fc7d0e

+6 -1
+6 -1
drivers/block/rsxx/dma.c
··· 986 986 int j; 987 987 int cnt; 988 988 struct rsxx_dma *dma; 989 - struct list_head issued_dmas[card->n_targets]; 989 + struct list_head *issued_dmas; 990 + 991 + issued_dmas = kzalloc(sizeof(*issued_dmas) * card->n_targets, 992 + GFP_KERNEL); 990 993 991 994 for (i = 0; i < card->n_targets; i++) { 992 995 INIT_LIST_HEAD(&issued_dmas[i]); ··· 1028 1025 } 1029 1026 spin_unlock(&card->ctrl[i].queue_lock); 1030 1027 } 1028 + 1029 + kfree(issued_dmas); 1031 1030 } 1032 1031 1033 1032 void rsxx_eeh_cancel_dmas(struct rsxx_cardinfo *card)