summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-19 11:36:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-19 11:36:49 -0800
commit281981ca87b9181e5408b0a7b33d3d7cf0c9a5ca (patch)
treece047de463a4da54d91b826312a5f5458f4fd6f4
parentf3485c82f75eeb951162dda663f45714627a85f5 (diff)
parentd8a0be6ab7ba1ffa43e7ea0dcdde3e8b68d4f762 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cciss: fix problem that deleting multiple logical drives could cause a panic
-rw-r--r--drivers/block/cciss.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 9364dc554257..9f7c543cc04b 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1693,6 +1693,11 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
for (i = 0; i <= h->highest_lun; i++) {
int j;
drv_found = 0;
+
+ /* skip holes in the array from already deleted drives */
+ if (h->drv[i].raid_level == -1)
+ continue;
+
for (j = 0; j < num_luns; j++) {
memcpy(&lunid, &ld_buff->LUN[j][0], 4);
lunid = le32_to_cpu(lunid);