Commit 5674d793 authored by Roman Stratiienko's avatar Roman Stratiienko Committed by Jan Kiszka

kernel: cobalt: replace access_ok with corresponding wrappers

Use access_wok / access_rok wrappers to enable support for kernel v5.0
Signed-off-by: default avatarRoman Stratiienko <roman.stratiienko@globallogic.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 6662b075
......@@ -28,6 +28,7 @@
#include <linux/device.h>
#include <linux/uaccess.h>
#include <asm/io.h>
#include <asm/xenomai/syscall.h>
#include <cobalt/kernel/sched.h>
#include <cobalt/kernel/heap.h>
#include <cobalt/kernel/pipe.h>
......@@ -795,7 +796,7 @@ static ssize_t xnpipe_read(struct file *file,
ssize_t ret;
spl_t s;
if (!access_ok(VERIFY_WRITE, buf, count))
if (!access_wok(buf, count))
return -EFAULT;
xnlock_get_irqsave(&nklock, s);
......@@ -903,7 +904,7 @@ static ssize_t xnpipe_write(struct file *file,
if (count == 0)
return 0;
if (!access_ok(VERIFY_READ, buf, count))
if (!access_rok(buf, count))
return -EFAULT;
xnlock_get_irqsave(&nklock, s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment