Module: xenomai-3
Branch: wip/rtnet-fixes
Commit: 514f7decb92648a9b1a25ba6005472eb83742d87
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=514f7decb92648a9b1a25ba6005472eb83742d87

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Dec  6 16:51:44 2017 +0100

cobalt/posix/signal: drop non-sensical masking with obsolete __SI_MASK

---

 kernel/cobalt/posix/compat.c |    9 ++-------
 kernel/cobalt/posix/signal.c |    9 ++-------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/kernel/cobalt/posix/compat.c b/kernel/cobalt/posix/compat.c
index 44521b5..962465a 100644
--- a/kernel/cobalt/posix/compat.c
+++ b/kernel/cobalt/posix/compat.c
@@ -301,19 +301,14 @@ int sys32_put_siginfo(void __user *u_si, const struct 
siginfo *si,
                      int overrun)
 {
        struct compat_siginfo __user *u_p = u_si;
-       int code, ret;
+       int ret;
 
        if (u_p == NULL)
                return -EFAULT;
 
-       /* Translate kernel codes for userland. */
-       code = si->si_code;
-       if (code & __SI_MASK)
-               code |= __SI_MASK;
-
        ret = __xn_put_user(si->si_signo, &u_p->si_signo);
        ret |= __xn_put_user(si->si_errno, &u_p->si_errno);
-       ret |= __xn_put_user(code, &u_p->si_code);
+       ret |= __xn_put_user(si->si_code, &u_p->si_code);
 
        /*
         * Copy the generic/standard siginfo bits to userland.
diff --git a/kernel/cobalt/posix/signal.c b/kernel/cobalt/posix/signal.c
index 416d3e4..e870283 100644
--- a/kernel/cobalt/posix/signal.c
+++ b/kernel/cobalt/posix/signal.c
@@ -339,16 +339,11 @@ static int signal_put_siginfo(void __user *u_si, const 
struct siginfo *si,
                              int overrun)
 {
        struct siginfo __user *u_p = u_si;
-       int code, ret;
-
-       /* Translate kernel codes for userland. */
-       code = si->si_code;
-       if (code & __SI_MASK)
-               code |= __SI_MASK;
+       int ret;
 
        ret = __xn_put_user(si->si_signo, &u_p->si_signo);
        ret |= __xn_put_user(si->si_errno, &u_p->si_errno);
-       ret |= __xn_put_user(code, &u_p->si_code);
+       ret |= __xn_put_user(si->si_code, &u_p->si_code);
 
        /*
         * Copy the generic/standard siginfo bits to userland.


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

Reply via email to