mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Properly release key in spa_keystore_dsl_key_hold_dd()
Since dsl_crypto_key_open() references the key, 0d23f5e2e4
should
have called dsl_crypto_key_rele() to drop it first instead of
calling dsl_crypto_key_free() directly. The final result should
actually be the same, but without triggering dck_holds assertion.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16567
This commit is contained in:
parent
832f66b218
commit
48d1be254f
@ -717,7 +717,7 @@ spa_keystore_dsl_key_hold_dd(spa_t *spa, dsl_dir_t *dd, const void *tag,
|
|||||||
avl_insert(&spa->spa_keystore.sk_dsl_keys, dck_io, where);
|
avl_insert(&spa->spa_keystore.sk_dsl_keys, dck_io, where);
|
||||||
*dck_out = dck_io;
|
*dck_out = dck_io;
|
||||||
} else {
|
} else {
|
||||||
dsl_crypto_key_free(dck_io);
|
dsl_crypto_key_rele(dck_io, tag);
|
||||||
*dck_out = dck_ks;
|
*dck_out = dck_ks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user