Download raw body.
Close the existing keydisk.img.
On Mon, 16 Feb 2026 09:15:42 +0900
ASOU Masato <takeasou.masato@gmail.com> wrote:
> I modified the patch.
> I've attach the patch because it changes tabs to space.
Let me put the diff inline.
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 6e24f2ff4f5..170b573f97d 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -837,7 +837,7 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, struct sr_crypto *mdd_crypto,
vput(vn);
goto done;
}
- open = 1; /* close dev on error */
+ open = 1;
/* Get partition details. */
label = malloc(sizeof(*label), M_DEVBUF, M_WAITOK);
@@ -878,7 +878,6 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, struct sr_crypto *mdd_crypto,
/* Construct key disk chunk. */
key_disk = malloc(sizeof(struct sr_chunk), M_DEVBUF, M_WAITOK | M_ZERO);
key_disk->src_dev_mm = dev;
- key_disk->src_vn = vn;
key_disk->src_size = 0;
memcpy(&key_disk->src_meta, (struct sr_meta_chunk *)(sm + 1),
@@ -900,8 +899,7 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, struct sr_crypto *mdd_crypto,
}
}
- open = 0;
-
+ /* keep `open = 1' to close dev */
done:
for (omi = SLIST_FIRST(&som); omi != NULL; omi = omi_next) {
omi_next = SLIST_NEXT(omi, omi_link);
Close the existing keydisk.img.