[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190206073659.GB15311@avx2>
Date: Wed, 6 Feb 2019 10:36:59 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH -mm 1/2] proc: exit correctly in /proc/*/maps test
If open() or writev() fails, test will hang waiting for child test
process.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.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. */
Powered by blists - more mailing lists