All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/pidfd_send_signal: Use local pointer to verify signal data
@ 2020-03-18  7:18 Viresh Kumar
  2020-03-18  7:54 ` Li Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Viresh Kumar @ 2020-03-18  7:18 UTC (permalink / raw)
  To: ltp

The current check, uinfo->si_value.sival_int == DATA, will always
evaluate to true as we are checking uinfo by mistake instead of the
pointer passed to the callback. Fix it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 .../kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
index 64dddad6643a..3137b6967371 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
@@ -26,7 +26,7 @@ static int pidfd;
 static void received_signal(int sig, siginfo_t *info, void *ucontext)
 {
 	if (info && ucontext) {
-		if (sig == SIGNAL && uinfo->si_value.sival_int == DATA) {
+		if (sig == SIGNAL && info->si_value.sival_int == DATA) {
 			tst_res(TPASS, "Received correct signal and data!");
 			sig_rec = 1;
 		} else {
-- 
2.21.0.rc0.269.g1a574e7a288b


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

* [LTP] [PATCH] syscalls/pidfd_send_signal: Use local pointer to verify signal data
  2020-03-18  7:18 [LTP] [PATCH] syscalls/pidfd_send_signal: Use local pointer to verify signal data Viresh Kumar
@ 2020-03-18  7:54 ` Li Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Li Wang @ 2020-03-18  7:54 UTC (permalink / raw)
  To: ltp

On Wed, Mar 18, 2020 at 3:18 PM Viresh Kumar <viresh.kumar@linaro.org>
wrote:

> The current check, uinfo->si_value.sival_int == DATA, will always
> evaluate to true as we are checking uinfo by mistake instead of the
> pointer passed to the callback. Fix it.
>

Pushed. Thanks for the fix.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200318/fc4c3f92/attachment.htm>

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

end of thread, other threads:[~2020-03-18  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18  7:18 [LTP] [PATCH] syscalls/pidfd_send_signal: Use local pointer to verify signal data Viresh Kumar
2020-03-18  7:54 ` Li Wang

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.