Merge tag 'printk-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek...
[muen/linux.git] / kernel / printk / printk.c
index 9b6783c..8eee85b 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/delay.h>
 #include <linux/smp.h>
 #include <linux/security.h>
-#include <linux/bootmem.h>
 #include <linux/memblock.h>
 #include <linux/syscalls.h>
 #include <linux/crash_core.h>
@@ -1146,9 +1145,9 @@ void __init setup_log_buf(int early)
 
        if (early) {
                new_log_buf =
-                       memblock_virt_alloc(new_log_buf_len, LOG_ALIGN);
+                       memblock_alloc(new_log_buf_len, LOG_ALIGN);
        } else {
-               new_log_buf = memblock_virt_alloc_nopanic(new_log_buf_len,
+               new_log_buf = memblock_alloc_nopanic(new_log_buf_len,
                                                          LOG_ALIGN);
        }
 
@@ -1510,7 +1509,7 @@ int do_syslog(int type, char __user *buf, int len, int source)
                        return -EINVAL;
                if (!len)
                        return 0;
-               if (!access_ok(VERIFY_WRITE, buf, len))
+               if (!access_ok(buf, len))
                        return -EFAULT;
                error = wait_event_interruptible(log_wait,
                                                 syslog_seq != log_next_seq);
@@ -1528,7 +1527,7 @@ int do_syslog(int type, char __user *buf, int len, int source)
                        return -EINVAL;
                if (!len)
                        return 0;
-               if (!access_ok(VERIFY_WRITE, buf, len))
+               if (!access_ok(buf, len))
                        return -EFAULT;
                error = syslog_print_all(buf, len, clear);
                break;