Module: xenomai-3
Branch: stable-3.0.x
Commit: f9f094562ba5c7e7da2c2897b288cdbb377ca9eb
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f9f094562ba5c7e7da2c2897b288cdbb377ca9eb

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat May 13 17:53:17 2017 +0200

drivers/ipc: prevent unwanted reference to passive code

---

 kernel/drivers/ipc/rtipc.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/kernel/drivers/ipc/rtipc.c b/kernel/drivers/ipc/rtipc.c
index 136f687..b23f8d6 100644
--- a/kernel/drivers/ipc/rtipc.c
+++ b/kernel/drivers/ipc/rtipc.c
@@ -108,12 +108,14 @@ int rtipc_put_iovec(struct rtdm_fd *fd, struct iovec *iov,
        if (!rtdm_fd_is_user(fd)) {
                memcpy(msg->msg_iov, iov, len);
                ret = 0;
-       } else if (IS_ENABLED(CONFIG_XENO_ARCH_SYS3264) &&
-                  rtdm_fd_is_compat(fd))
-               ret = sys32_put_iovec((struct compat_iovec __user 
*)msg->msg_iov,
-                                     iov, msg->msg_iovlen);
-       else
-               ret = rtdm_copy_to_user(fd, msg->msg_iov, iov, len);
+       } else
+#ifdef CONFIG_XENO_ARCH_SYS3264
+               if (rtdm_fd_is_compat(fd))
+                       ret = sys32_put_iovec((struct compat_iovec __user 
*)msg->msg_iov,
+                                             iov, msg->msg_iovlen);
+               else
+#endif
+                       ret = rtdm_copy_to_user(fd, msg->msg_iov, iov, len);
 
        if (iov != iov_fast)
                xnfree(iov);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to