On Wed, Aug 05, 2026 at 05:06:39PM +0530, Sourabh Jain wrote:


On 29/07/26 09:06, Coiby Xu wrote:
kexec_dprintk will only be activated by "kexec -d" during
kexec_file_load syscall. So use pr_* outside of this syscall.

Fixes: 9ebfa8dcaea7 ("crash_dump: reuse saved dm crypt keys for CPU/memory 
hot-plugging")
Fixes: 62f17d9df692 ("crash_dump: retrieve dm crypt keys in kdump kernel")
Signed-off-by: Coiby Xu <[email protected]>
---
 kernel/crash_dump_dm_crypt.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/kernel/crash_dump_dm_crypt.c b/kernel/crash_dump_dm_crypt.c
index 9a64e2d6841b..3ee01996778f 100644
--- a/kernel/crash_dump_dm_crypt.c
+++ b/kernel/crash_dump_dm_crypt.c
@@ -75,10 +75,10 @@ static int add_key_to_keyring(struct dm_crypt_key *dm_key,
        if (!IS_ERR(key_ref)) {
                r = key_ref_to_ptr(key_ref)->serial;
                key_ref_put(key_ref);
-               kexec_dprintk("Success adding key %s", dm_key->key_desc);
+               pr_debug("Success adding key %s", dm_key->key_desc);

Missing a newline in the above debug message.

        } else {
                r = PTR_ERR(key_ref);
-               kexec_dprintk("Error when adding key");
+               pr_warn("Error when adding key");
        }

Missing a newline. Also, I think printing the error code (r) would be helpful.

Good catches! And I'll apply your suggestion!


Apart from these two minor nits, the changes look good to me.

Reviewed-by: Sourabh Jain <[email protected]>

Thanks for reviewing the patch!

[...]

--
Best regards,
Coiby

Reply via email to