Skip to content

Commit

Permalink
SUNRPC: Properly terminate test case arrays
Browse files Browse the repository at this point in the history
Unable to handle kernel paging request at virtual address 73657420 when execute
[73657420] *pgd=00000000
Internal error: Oops: 80000005 [#1] ARM
CPU: 0 PID: 1 Comm: swapper Tainted: G                 N 6.2.0-rc7-00133-g373f26a81164-dirty #9
Hardware name: Generic DT based system
PC is at 0x73657420
LR is at kunit_run_tests+0x3e0/0x5f4

On x86 with GCC 12, the missing array terminators did not seem to
matter. Other platforms appear to be more picky.

Reported-by: Geert Uytterhoeven <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
  • Loading branch information
Chuck Lever authored and chucklever committed Feb 27, 2023
1 parent fe90151 commit fb5b855
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/sunrpc/auth_gss/gss_krb5_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ static struct kunit_case rfc3961_test_cases[] = {
.run_case = kdf_case,
.generate_params = rfc3961_kdf_gen_params,
},
{}
};

static struct kunit_suite rfc3961_suite = {
Expand Down Expand Up @@ -780,6 +781,7 @@ static struct kunit_case rfc3962_test_cases[] = {
.run_case = rfc3962_encrypt_case,
.generate_params = rfc3962_encrypt_gen_params,
},
{}
};

static struct kunit_suite rfc3962_suite = {
Expand Down Expand Up @@ -1415,6 +1417,7 @@ static struct kunit_case rfc6803_test_cases[] = {
.run_case = rfc6803_encrypt_case,
.generate_params = rfc6803_encrypt_gen_params,
},
{}
};

static struct kunit_suite rfc6803_suite = {
Expand Down Expand Up @@ -1907,6 +1910,7 @@ static struct kunit_case rfc8009_test_cases[] = {
.run_case = rfc8009_encrypt_case,
.generate_params = rfc8009_encrypt_gen_params,
},
{}
};

static struct kunit_suite rfc8009_suite = {
Expand Down Expand Up @@ -2029,6 +2033,7 @@ static struct kunit_case encryption_test_cases[] = {
.run_case = encrypt_selftest_case,
.generate_params = encrypt_selftest_gen_params,
},
{}
};

static struct kunit_suite encryption_test_suite = {
Expand Down

0 comments on commit fb5b855

Please sign in to comment.