blob: c6d509bcd119e3ce71a3f5f85d12ecb86b7cb3c6 [file] [log] [blame]
// BUG: using __this_cpu_read() in preemptible code in ip6_finish_output
// https://syzkaller.appspot.com/bug?id=922b64d383a6ce0cce80fc5b044f0ec9036a8d6b
// status:fixed
// 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;
res = syscall(__NR_socket, 0xa, 1, 0);
if (res != -1)
r[0] = res;
*(uint16_t*)0x20000380 = 0xa;
*(uint16_t*)0x20000382 = htobe16(0x4e22);
*(uint32_t*)0x20000384 = htobe32(0);
*(uint64_t*)0x20000388 = htobe64(0);
*(uint64_t*)0x20000390 = htobe64(1);
*(uint32_t*)0x20000398 = 0;
syscall(__NR_sendto, r[0], 0, 0, 0x20000000, 0x20000380, 0x1c);
return 0;
}