summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/ecryptfs/debug.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c
index d34a1d6b40fc..0556af1adfb7 100644
--- a/fs/ecryptfs/debug.c
+++ b/fs/ecryptfs/debug.c
@@ -139,8 +139,12 @@ void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat)
if (!stat)
return;
- ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher is %s\n", stat->cipher);
+ if (stat->cipher)
+ ecryptfs_printk(KERN_DEBUG,
+ "ecryptfs cipher is %s\n", stat->cipher);
+
+ if (stat->cipher_mode)
+ ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n",
+ stat->cipher_mode);
- ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n",
- stat->cipher_mode);
}