From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH -mm 1/2] proc: exit correctly in /proc/*/maps test
Date: Wed, 6 Feb 2019 10:36:59 +0300 [thread overview]
Message-ID: <20190206073659.GB15311@avx2> (raw)
If open() or writev() fails, test will hang waiting for child test
process.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
fold into proc-test-proc-maps-smaps-smaps_rollup-statm.patch
tools/testing/selftests/proc/proc-pid-vm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/tools/testing/selftests/proc/proc-pid-vm.c
+++ b/tools/testing/selftests/proc/proc-pid-vm.c
@@ -189,11 +189,11 @@ static int make_exe(const uint8_t *payload, size_t len)
fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_EXCL|O_TMPFILE, 0700);
if (fd == -1) {
- return 1;
+ exit(1);
}
if (writev(fd, iov, 3) != sizeof(struct elf64_hdr) + sizeof(struct elf64_phdr) + len) {
- return 1;
+ exit(1);
}
/* Avoid ETXTBSY on exec. */
next reply other threads:[~2019-02-06 7:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 7:36 Alexey Dobriyan [this message]
2019-02-06 7:39 ` [PATCH -mm 2/2] proc: use ramfs for executable generation Alexey Dobriyan
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=20190206073659.GB15311@avx2 \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).