aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/miscdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/miscdev.c')
-rw-r--r--fs/ecryptfs/miscdev.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
index e4141f257495..f09cacaf8c80 100644
--- a/fs/ecryptfs/miscdev.c
+++ b/fs/ecryptfs/miscdev.c
@@ -163,12 +163,8 @@ int ecryptfs_send_miscdev(char *data, size_t data_size,
163 struct ecryptfs_message *msg; 163 struct ecryptfs_message *msg;
164 164
165 msg = kmalloc((sizeof(*msg) + data_size), GFP_KERNEL); 165 msg = kmalloc((sizeof(*msg) + data_size), GFP_KERNEL);
166 if (!msg) { 166 if (!msg)
167 printk(KERN_ERR "%s: Out of memory whilst attempting "
168 "to kmalloc(%zd, GFP_KERNEL)\n", __func__,
169 (sizeof(*msg) + data_size));
170 return -ENOMEM; 167 return -ENOMEM;
171 }
172 168
173 mutex_lock(&msg_ctx->mux); 169 mutex_lock(&msg_ctx->mux);
174 msg_ctx->msg = msg; 170 msg_ctx->msg = msg;
@@ -383,7 +379,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf,
383 goto memdup; 379 goto memdup;
384 } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) { 380 } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) {
385 printk(KERN_WARNING "%s: Acceptable packet size range is " 381 printk(KERN_WARNING "%s: Acceptable packet size range is "
386 "[%d-%zu], but amount of data written is [%zu].", 382 "[%d-%zu], but amount of data written is [%zu].\n",
387 __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count); 383 __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count);
388 return -EINVAL; 384 return -EINVAL;
389 } 385 }