blob: a6b58a0a709d78fc786c523a7819adca80b193c4 [file] [log] [blame]
// possible deadlock in vfs_fallocate
// https://syzkaller.appspot.com/bug?id=5354f1d031a05ad221d00f040e18dc90a2ffd180
// 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[1] = {0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
long res = 0;
memcpy((void*)0x20000100, "/dev/ashmem\000", 12);
res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000100, 0, 0);
if (res != -1)
r[0] = res;
syscall(__NR_ioctl, r[0], 0x40087703, 0xfffffffd);
syscall(__NR_mmap, 0x206fc000, 0x4000, 0, 0x12, r[0], 0);
memcpy((void*)0x20000180,
"\000\000\000\000\000\000\307)B\242\206\305\254\254{"
"0y\334\203\265\232\240\025\302Z\307\367D\253Y\343\265pm\237R\232s\335"
"\306\364\222\321\3129{\256&\215\037 "
"cdw\033A\253P\023_3\217Z`\311\016\365\036\262\v\323\317\327\365^"
"k\b\311\016\340\353\331\372\350@J\0176\372_vW\322`"
"t\203\225\256\306\207\237xk4\230\274u\364\327\216\aM\354&"
"\322\3569W\231\374S\213\004\335?M\230G\330\311\345<"
"\305\240\034\374ja}\340\r\a>"
"\231\036R\323\204\230c\005\003O\251\213\332X\356\254\300\340\210b`"
"\334A\327\314>\365\320e)\320\266\260*A\313\036\027~\232\255\320*"
"\242\341\022\216\236\367\033q\223Z~"
"\327\035\261\267by\320\325\233\222n\344w\271\322\302\r\314-"
"\034\276\324\265j\256\002g\262<\036\262&yii1\027w\257`4\311\366_h_"
"\f\375\231\022c\273\v\a\'\303\331\221R\362\364\347\266!"
"\267\211X\2066A\222\2552a\243.\335&"
"\252\221\f\325\262\311Z\327\2743\235\222\247\303\n:"
"C\027\233\206\324jR\251\357\247\230\224G\243\023",
306);
syscall(__NR_ioctl, r[0], 0x40087708, 0x20000180);
syscall(__NR_ioctl, r[0], 0x770a, 0);
return 0;
}