lkml.org 
[lkml]   [2018]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: INFO: rcu detected stall in blkdev_ioctl
From
Date
If various stall reports regarding loop_set_fd() are hitting below sequence, a patch
was proposed at https://groups.google.com/d/msg/syzkaller-bugs/5pzXJ8yQFR0/vWeRytaQBAAJ .

----------
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/loop.h>

int main(int argc, char *argv[])
{
const int fd = open("/tmp/file", O_RDWR | O_CREAT | O_TRUNC, 0600);
const int fd0 = open("/dev/loop0", O_RDONLY);
const int fd1 = open("/dev/loop1", O_RDONLY);
ioctl(fd0, LOOP_SET_FD, fd);
ioctl(fd0, LOOP_CHANGE_FD, fd0);
ioctl(fd1, LOOP_SET_FD, fd0);
return 0;
}
----------


\
 
 \ /
  Last update: 2018-05-05 13:59    [W:0.039 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site