* [Xenomai] [PATCH] cobalt/posix/signal: Fix return code on siginfo copy errors
@ 2018-09-03 17:08 Jan Kiszka
2018-09-17 18:18 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2018-09-03 17:08 UTC (permalink / raw)
To: Xenomai
The put_siginfo functions return a non-zero value on error. We have to
convert that into proper -EFAULT before returning.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
kernel/cobalt/posix/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cobalt/posix/signal.c b/kernel/cobalt/posix/signal.c
index 1c62bd984d..7e0eb52e99 100644
--- a/kernel/cobalt/posix/signal.c
+++ b/kernel/cobalt/posix/signal.c
@@ -376,7 +376,7 @@ out:
/* no more ref. to sigp beyond this point. */
}
- return ret ?: sig;
+ return ret ? -EFAULT : sig;
fail:
xnlock_put_irqrestore(&nklock, s);
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Xenomai] [PATCH] cobalt/posix/signal: Fix return code on siginfo copy errors
2018-09-03 17:08 [Xenomai] [PATCH] cobalt/posix/signal: Fix return code on siginfo copy errors Jan Kiszka
@ 2018-09-17 18:18 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2018-09-17 18:18 UTC (permalink / raw)
To: Xenomai
On 03.09.18 19:08, Jan Kiszka wrote:
> The put_siginfo functions return a non-zero value on error. We have to
> convert that into proper -EFAULT before returning.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> kernel/cobalt/posix/signal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/cobalt/posix/signal.c b/kernel/cobalt/posix/signal.c
> index 1c62bd984d..7e0eb52e99 100644
> --- a/kernel/cobalt/posix/signal.c
> +++ b/kernel/cobalt/posix/signal.c
> @@ -376,7 +376,7 @@ out:
> /* no more ref. to sigp beyond this point. */
> }
>
> - return ret ?: sig;
> + return ret ? -EFAULT : sig;
> fail:
> xnlock_put_irqrestore(&nklock, s);
>
>
No complaints - merged to next.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-17 18:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 17:08 [Xenomai] [PATCH] cobalt/posix/signal: Fix return code on siginfo copy errors Jan Kiszka
2018-09-17 18:18 ` 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.