blob: d690628b82fa643127392db752596b2cfc369966 [file] [log] [blame]
// possible deadlock in free_ioctx_users
// https://syzkaller.appspot.com/bug?id=7ac0a22dad5fe5907c7c5dd72dfa6c9ab6882755
// status:open
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
uint64_t r[2] = {0xffffffffffffffff, 0x0};
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
intptr_t res = 0;
memcpy((void*)0x200002c0, "/dev/cuse\000", 10);
res = syscall(__NR_openat, 0xffffffffffffff9c, 0x200002c0, 0x82, 0);
if (res != -1)
r[0] = res;
res = syscall(__NR_io_setup, 3, 0x20000000);
if (res != -1)
r[1] = *(uint64_t*)0x20000000;
*(uint64_t*)0x20000440 = 0x20000200;
*(uint64_t*)0x20000200 = 0;
*(uint32_t*)0x20000208 = 0;
*(uint32_t*)0x2000020c = 0;
*(uint16_t*)0x20000210 = 5;
*(uint16_t*)0x20000212 = 0;
*(uint32_t*)0x20000214 = r[0];
*(uint64_t*)0x20000218 = 0;
*(uint64_t*)0x20000220 = 0;
*(uint64_t*)0x20000228 = 0;
*(uint64_t*)0x20000230 = 0;
*(uint32_t*)0x20000238 = 0;
*(uint32_t*)0x2000023c = -1;
syscall(__NR_io_submit, r[1], 1, 0x20000440);
return 0;
}