This is a note to let you know that I've just added the patch titled
cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding
deallocation
to the 2.6.38-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
cciss-add-missing-allocation-in-scsi_cmd_stack_setup-and-corresponding-deallocation.patch
and it can be found in the queue-2.6.38 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 978eb516a4e1a1b47163518d6f5d5e81ab27a583 Mon Sep 17 00:00:00 2001
From: Stephen M. Cameron <[email protected]>
Date: Fri, 11 Mar 2011 20:07:38 +0100
Subject: cciss: Add missing allocation in scsi_cmd_stack_setup and
corresponding deallocation
From: Stephen M. Cameron <[email protected]>
commit 978eb516a4e1a1b47163518d6f5d5e81ab27a583 upstream.
This bit got lost somewhere along the way. Without this, panic.
Signed-off-by: Stephen M. Cameron <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/block/cciss_scsi.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/block/cciss_scsi.c
+++ b/drivers/block/cciss_scsi.c
@@ -226,6 +226,13 @@ scsi_cmd_stack_setup(ctlr_info_t *h, str
return -ENOMEM;
}
+ stk->elem = kmalloc(sizeof(stk->elem[0]) * stk->nelems, GFP_KERNEL);
+ if (!stk->elem) {
+ pci_free_consistent(h->pdev, size, stk->pool,
+ stk->cmd_pool_handle);
+ return -1;
+ }
+
for (i=0; i<CMD_STACK_SIZE; i++) {
stk->elem[i] = &stk->pool[i];
stk->elem[i]->busaddr = (__u32) (stk->cmd_pool_handle +
@@ -255,6 +262,8 @@ scsi_cmd_stack_free(ctlr_info_t *h)
pci_free_consistent(h->pdev, size, stk->pool, stk->cmd_pool_handle);
stk->pool = NULL;
cciss_free_sg_chain_blocks(sa->cmd_sg_list, CMD_STACK_SIZE);
+ kfree(stk->elem);
+ stk->elem = NULL;
}
#if 0
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.38/cciss-add-missing-allocation-in-scsi_cmd_stack_setup-and-corresponding-deallocation.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable