Revert "memory_range_lock: Enable interrupt when trylock fails"

This reverts commit 0d3ef65092.

Reason for revert: This fix causes circular dependency with memory_range manipulation and TLB flush. See #1394.

Change-Id: I4774e81ff300c199629e283e538c0a30ad0eeaae
This commit is contained in:
Masamichi Takagi
2019-09-20 07:18:15 +00:00
committed by Ken Sato
parent 41d37bcd30
commit edd3ea0103
12 changed files with 102 additions and 393 deletions

View File

@ -1,40 +0,0 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
int
main(int argc, char **argv)
{
pid_t pid;
int st;
fprintf(stderr, "*** C452T01 test start\n");
fflush(stderr);
pid = fork();
if (pid == 0) {
char file[32];
sleep(1);
sprintf(file, "/proc/%d/maps", getppid());
execlp("cat", "cat", file, NULL);
exit(1);
}
fflush(stdout);
if (syscall(740, 1) == -1) {
fprintf(stderr, "*** C452T01 FAIL no patched kernel\n");
exit(1);
}
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
syscall(740, 0);
while (waitpid(pid, &st, 0) == -1 && errno == EINTR)
;
fprintf(stderr, "*** C452T01 PASS\n");
exit(0);
}