[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fix blkback/blktap sysfs read bug.



>>> "Joe Jin" <joe.jin@xxxxxxxxxx> 19.01.10 15:13 >>>
>When tested continous reboot VM testcase kernel panic. then I write 
>a program as blow:
>while (1) {
>       open("/sys/devices/xen-backend/vbd-x-xxxx/statistics/rd_sect");
>       usleep(100);
>       read(fd, buff, BUFF_LEN);
>}
>
>running it, then reboot the vm, will hit the panic.
>
>As I have menthioned, when open the file, kernel have initialized 
>file handler, when call file operation, call the function.
>At here, even blkback_remove() have delete sysfs entry, but did not
>released sysfs->fops, that caused the panic.

That would seem like a general sysfs problem then - I can't imagine
other modules do much to prevent this, though I'm sure there are
other modules which add/remove entries on the fly. Would require
some looking through the sources to see whether there is any
generally usable (and simple) solution to this.

But irrespective of that, I think the race remains even after your
patch - only the window gets smaller.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.