All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: cobalt: replace access_ok with corresponding wrappers
@ 2019-03-11 14:37 roman.stratiienko
  2019-03-11 14:37 ` [PATCH v3] travis: add basic CI support roman.stratiienko
  2019-03-19 20:03 ` [PATCH] kernel: cobalt: replace access_ok with corresponding wrappers Jan Kiszka
  0 siblings, 2 replies; 12+ messages in thread
From: roman.stratiienko @ 2019-03-11 14:37 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

Use access_wok / access_rok wrappers to enable support for kernel v5.0

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---

This patch is also required to support v5.0

 kernel/cobalt/pipe.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/pipe.c b/kernel/cobalt/pipe.c
index 0b8f8cbf8..16e85125c 100644
--- a/kernel/cobalt/pipe.c
+++ b/kernel/cobalt/pipe.c
@@ -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);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-03-19 20:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 14:37 [PATCH] kernel: cobalt: replace access_ok with corresponding wrappers roman.stratiienko
2019-03-11 14:37 ` [PATCH v3] travis: add basic CI support roman.stratiienko
2019-03-18 12:59   ` Jan Kiszka
2019-03-18 13:25     ` Jan Kiszka
2019-03-18 14:21       ` Roman Stratiienko
2019-03-18 14:24         ` Jan Kiszka
2019-03-18 15:39           ` Jan Kiszka
2019-03-18 16:47             ` Roman Stratiienko
2019-03-18 16:51               ` Jan Kiszka
2019-03-18 17:22                 ` Roman Stratiienko
2019-03-18 17:45                   ` Philippe Gerum
2019-03-19 20:03 ` [PATCH] kernel: cobalt: replace access_ok with corresponding wrappers Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.