// 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>

#ifndef __NR_mmap
#define __NR_mmap 192
#endif
#ifndef __NR_openat
#define __NR_openat 295
#endif
#ifndef __NR_chown
#define __NR_chown 182
#endif
#ifndef __NR_ioctl
#define __NR_ioctl 54
#endif
#undef __NR_mmap
#define __NR_mmap __NR_mmap2

long r[1];
void loop()
{
  memset(r, -1, sizeof(r));
  syscall(__NR_mmap, 0x20000000, 0x7000, 3, 0x32, -1, 0);
  memcpy((void*)0x20000000, "/dev/ion", 9);
  r[0] = syscall(__NR_openat, 0xffffff9c, 0x20000000, 0, 0);
  memcpy((void*)0x20002000, "./file0", 8);
  syscall(__NR_chown, 0x20002000, 0, 0);
  syscall(__NR_ioctl, r[0], 0xc0184908, 0x20002000);
}

int main()
{
  loop();
  return 0;
}
