From: Jan Stancek <jstancek@redhat.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH v2] dio_sparse: prevent race between kill and signal
Date: Wed, 06 Jun 2012 14:28:44 +0200 [thread overview]
Message-ID: <4FCF4CFC.2010100@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 452 bytes --]
This is same change as in:
commit d8f1292181b486b2073cc6fe1ec226f5cedea342
Author: Cyril Hrubis <chrubis@suse.cz>
Date: Fri Mar 2 13:37:47 2012 +0100
ltp-aiodio: aiodio_sparse fix race condition
but for dio_sparse.c, which is also prone to race
between kill() and signal().
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
testcases/kernel/io/ltp-aiodio/dio_sparse.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
[-- Attachment #2: 0001-dio_sparse-prevent-race-between-kill-and-signal.patch --]
[-- Type: text/x-patch, Size: 739 bytes --]
diff --git a/testcases/kernel/io/ltp-aiodio/dio_sparse.c b/testcases/kernel/io/ltp-aiodio/dio_sparse.c
index e93dcd9..97dbef8 100644
--- a/testcases/kernel/io/ltp-aiodio/dio_sparse.c
+++ b/testcases/kernel/io/ltp-aiodio/dio_sparse.c
@@ -149,10 +149,10 @@ int main(int argc, char **argv)
dirty_freeblocks(filesize);
tst_resm(TINFO, "Starting I/O tests");
+ signal(SIGTERM, SIG_DFL);
for (i = 0; i < num_children; i++) {
switch (pid[i] = fork()) {
case 0:
- signal(SIGTERM, SIG_DFL);
read_sparse(filename, filesize);
break;
case -1:
@@ -164,6 +164,7 @@ int main(int argc, char **argv)
continue;
}
}
+ tst_sig(FORK, DEF_HANDLER, cleanup);
ret = dio_sparse(filename, alignment, writesize, filesize);
[-- Attachment #3: Type: text/plain, Size: 395 bytes --]
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2012-06-06 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 12:28 Jan Stancek [this message]
2012-06-06 13:56 ` [LTP] [PATCH v2] dio_sparse: prevent race between kill and signal Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FCF4CFC.2010100@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.