Skip to content

Commit 789b4a4

Browse files
committed
Merge tag 'nfsd-6.3-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fixes from Chuck Lever: - Address two issues with the new GSS krb5 Kunit tests * tag 'nfsd-6.3-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Fix failures of checksum Kunit tests sunrpc: Fix RFC6803 encryption test
2 parents 40aacb3 + d514251 commit 789b4a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

net/sunrpc/auth_gss/gss_krb5_test.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ static void checksum_case(struct kunit *test)
7373
{
7474
const struct gss_krb5_test_param *param = test->param_value;
7575
struct xdr_buf buf = {
76-
.head[0].iov_base = param->plaintext->data,
7776
.head[0].iov_len = param->plaintext->len,
7877
.len = param->plaintext->len,
7978
};
@@ -99,6 +98,10 @@ static void checksum_case(struct kunit *test)
9998
err = crypto_ahash_setkey(tfm, Kc.data, Kc.len);
10099
KUNIT_ASSERT_EQ(test, err, 0);
101100

101+
buf.head[0].iov_base = kunit_kzalloc(test, buf.head[0].iov_len, GFP_KERNEL);
102+
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf.head[0].iov_base);
103+
memcpy(buf.head[0].iov_base, param->plaintext->data, buf.head[0].iov_len);
104+
102105
checksum.len = gk5e->cksumlength;
103106
checksum.data = kunit_kzalloc(test, checksum.len, GFP_KERNEL);
104107
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, checksum.data);
@@ -1327,6 +1330,7 @@ static void rfc6803_encrypt_case(struct kunit *test)
13271330
if (!gk5e)
13281331
kunit_skip(test, "Encryption type is not available");
13291332

1333+
memset(usage_data, 0, sizeof(usage_data));
13301334
usage.data[3] = param->constant;
13311335

13321336
Ke.len = gk5e->Ke_length;

0 commit comments

Comments
 (0)