]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - crypto/async_tx/raid6test.c
async_pq: Remove VLA usage
[linux.git] / crypto / async_tx / raid6test.c
index dad95f45b88f6566afc62df645151d3a2ae60092..a5edaabae12a1ea1b90b3696209c54624ce8cc7d 100644 (file)
@@ -81,11 +81,13 @@ static void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, stru
                        init_async_submit(&submit, 0, NULL, NULL, NULL, addr_conv);
                        tx = async_gen_syndrome(ptrs, 0, disks, bytes, &submit);
                } else {
-                       struct page *blocks[disks];
+                       struct page *blocks[NDISKS];
                        struct page *dest;
                        int count = 0;
                        int i;
 
+                       BUG_ON(disks > NDISKS);
+
                        /* data+Q failure.  Reconstruct data from P,
                         * then rebuild syndrome
                         */