| // possible deadlock in __might_fault |
| // https://syzkaller.appspot.com/bug?id=613bcaf22505b13945291c0ed13c2479fc76ca8c |
| // status:fixed |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| #include <endian.h> |
| #include <stdint.h> |
| #include <string.h> |
| #include <sys/syscall.h> |
| #include <unistd.h> |
| |
| uint64_t r[1] = {0xffffffffffffffff}; |
| void loop() |
| { |
| long res; |
| memcpy((void*)0x201caff4, "/dev/ashmem", 12); |
| res = syscall(__NR_openat, 0xffffffffffffff9c, 0x201caff4, 0, 0); |
| if (res != -1) |
| r[0] = res; |
| syscall(__NR_ioctl, r[0], 0x40087703, 0x400); |
| syscall(__NR_mmap, 0x20fff000, 0x1000, 0, 0x12, r[0], 0); |
| syscall(__NR_ioctl, r[0], 0x7709, 0); |
| } |
| |
| int main() |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| loop(); |
| return 0; |
| } |