mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
Merge pull request #30675 from idryomov/wip-set-kernel-secret
common/secret.c: don't pass uninitialized stack data to the kernel Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
32fc260eba
@ -69,7 +69,7 @@ int set_kernel_secret(const char *secret, const char *key_name)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
serial = add_key("ceph", key_name, payload, sizeof(payload), KEY_SPEC_PROCESS_KEYRING);
|
serial = add_key("ceph", key_name, payload, ret, KEY_SPEC_PROCESS_KEYRING);
|
||||||
if (serial == -1) {
|
if (serial == -1) {
|
||||||
ret = -errno;
|
ret = -errno;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user