Skip to content

Commit

Permalink
raid6test: fix stack overflow
Browse files Browse the repository at this point in the history
Testing on x86_64 with NDISKS=255 yields:

   do_IRQ: modprobe near stack overflow (cur:ffff88007d19c000,sp:ffff88007d19c128)

...and eventually

   general protection fault: 0000 [#1]

Moving the scribble buffers off the stack allows the test to complete
successfully.

Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed Sep 17, 2009
1 parent 376ec37 commit 1b6df69
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crypto/async_tx/raid6test.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define NDISKS 16 /* Including P and Q */

static struct page *dataptrs[NDISKS];
static addr_conv_t addr_conv[NDISKS];
static struct page *data[NDISKS+3];
static struct page *spare;
static struct page *recovi;
Expand Down Expand Up @@ -69,7 +70,6 @@ static char disk_type(int d, int disks)
static void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, struct page **ptrs)
{
struct async_submit_ctl submit;
addr_conv_t addr_conv[disks];
struct completion cmp;
struct dma_async_tx_descriptor *tx = NULL;
enum sum_check_flags result = ~0;
Expand Down Expand Up @@ -156,7 +156,6 @@ static int test_disks(int i, int j, int disks)

static int test(int disks, int *tests)
{
addr_conv_t addr_conv[disks];
struct dma_async_tx_descriptor *tx;
struct async_submit_ctl submit;
struct completion cmp;
Expand Down

0 comments on commit 1b6df69

Please sign in to comment.