| // possible deadlock in flush_work |
| // https://syzkaller.appspot.com/bug?id=377386a07fe7dab185179260c8854ec248856cfb |
| // status:invalid |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| |
| #include <stdint.h> |
| #include <string.h> |
| #include <sys/syscall.h> |
| #include <unistd.h> |
| |
| static void test(); |
| |
| void loop() |
| { |
| while (1) { |
| test(); |
| } |
| } |
| |
| long r[4]; |
| void test() |
| { |
| memset(r, -1, sizeof(r)); |
| r[0] = syscall(__NR_mmap, 0x20000000ul, 0xfff000ul, 0x3ul, 0x32ul, |
| 0xfffffffffffffffful, 0x0ul); |
| memcpy((void*)0x20aeaff7, "\x2f\x64\x65\x76\x2f\x6b\x76\x6d\x00", 9); |
| r[2] = syscall(__NR_openat, 0xffffffffffffff9cul, 0x20aeaff7ul, 0x0ul, |
| 0x0ul); |
| r[3] = syscall(__NR_ioctl, r[2], 0xae01ul, 0x0ul); |
| } |
| |
| int main() |
| { |
| int i; |
| for (i = 0; i < 8; i++) { |
| if (fork() == 0) { |
| loop(); |
| return 0; |
| } |
| } |
| sleep(1000000); |
| return 0; |
| } |