aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/printk.c4
-rw-r--r--kernel/sysctl.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index bb0635bd74f2..879edfc5ee52 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -32,7 +32,6 @@
32#include <linux/security.h> 32#include <linux/security.h>
33#include <linux/bootmem.h> 33#include <linux/bootmem.h>
34#include <linux/memblock.h> 34#include <linux/memblock.h>
35#include <linux/aio.h>
36#include <linux/syscalls.h> 35#include <linux/syscalls.h>
37#include <linux/kexec.h> 36#include <linux/kexec.h>
38#include <linux/kdb.h> 37#include <linux/kdb.h>
@@ -46,6 +45,7 @@
46#include <linux/irq_work.h> 45#include <linux/irq_work.h>
47#include <linux/utsname.h> 46#include <linux/utsname.h>
48#include <linux/ctype.h> 47#include <linux/ctype.h>
48#include <linux/uio.h>
49 49
50#include <asm/uaccess.h> 50#include <asm/uaccess.h>
51 51
@@ -521,7 +521,7 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
521 int i; 521 int i;
522 int level = default_message_loglevel; 522 int level = default_message_loglevel;
523 int facility = 1; /* LOG_USER */ 523 int facility = 1; /* LOG_USER */
524 size_t len = iocb->ki_nbytes; 524 size_t len = iov_iter_count(from);
525 ssize_t ret = len; 525 ssize_t ret = len;
526 526
527 if (len > LOG_LINE_MAX) 527 if (len > LOG_LINE_MAX)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ce410bb9f2e1..4012336de30f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -19,6 +19,7 @@
19 */ 19 */
20 20
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/aio.h>
22#include <linux/mm.h> 23#include <linux/mm.h>
23#include <linux/swap.h> 24#include <linux/swap.h>
24#include <linux/slab.h> 25#include <linux/slab.h>