cciss: Make cciss_seq_show handle holes in the h->drv[] array
commitb7f7ed5565c30f4e1058d7c97c49fe52e0136ee9
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Fri, 5 Feb 2010 12:14:04 +0000 (5 13:14 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:27 +0000 (1 15:55 -0700)
treead3fbf9ea7e41663d8256a013c696a43740d891a
parent77e4ffd96c3120efc81e1060606b0ea31b84e50b
cciss: Make cciss_seq_show handle holes in the h->drv[] array

commit 531c2dc70d339c5dfa8c3eb628c3459dc6f3a075 upstream.

It is possible (and expected) for there to be holes in the h->drv[]
array, that is, some elements may be NULL pointers.  cciss_seq_show
needs to be made aware of this possibility to avoid an Oops.

To reproduce the Oops which this fixes:

1) Create two "arrays" in the Array Configuratino Utility and
   several logical drives on each array.
2) cat /proc/driver/cciss/cciss* in an infinite loop
3) delete some of the logical drives in the first "array."

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/cciss.c