blob: 80df085ed02e7d579099303e342e76b08006a01a [file] [log] [blame]
// INFO: task hung in ucma_close
// https://syzkaller.appspot.com/bug?id=a75a7cdefecc3905d531b731b7e46b65aff0de88
// 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, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
intptr_t res = 0;
memcpy((void*)0x20000080, "/dev/infiniband/rdma_cm\000", 24);
res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000080, 2, 0);
if (res != -1)
r[0] = res;
*(uint32_t*)0x20000280 = 0;
*(uint16_t*)0x20000284 = 0x18;
*(uint16_t*)0x20000286 = 0xfa00;
*(uint64_t*)0x20000288 = 0;
*(uint64_t*)0x20000290 = 0x20000000;
*(uint16_t*)0x20000298 = 0x13f;
*(uint8_t*)0x2000029a = 0;
*(uint8_t*)0x2000029b = 0;
*(uint8_t*)0x2000029c = 0;
*(uint8_t*)0x2000029d = 0;
*(uint8_t*)0x2000029e = 0;
*(uint8_t*)0x2000029f = 0;
res = syscall(__NR_write, r[0], 0x20000280, 0x20);
if (res != -1)
r[1] = *(uint32_t*)0x20000000;
*(uint32_t*)0x20000200 = 0xe;
*(uint16_t*)0x20000204 = 0x18;
*(uint16_t*)0x20000206 = 0xfa00;
*(uint64_t*)0x20000208 = 0x200001c0;
*(uint32_t*)0x200001c0 = 0;
*(uint32_t*)0x20000210 = r[1];
*(uint32_t*)0x20000214 = 0;
*(uint32_t*)0x20000218 = 2;
*(uint32_t*)0x2000021c = 0xffffffad;
syscall(__NR_write, r[0], 0x20000200, 0x20);
return 0;
}