Re: What protection does sysfs_readdir have with SMP/Preemption?

From: Maneesh Soni
Date: Wed Nov 23 2005 - 07:56:52 EST


On Wed, Nov 23, 2005 at 07:35:04AM -0500, Steven Rostedt wrote:
>
> On Wed, 23 Nov 2005, Ingo Molnar wrote:
>
> >
> > note that Steven has a dual-core Athlon64 X2 system. Steven, do you get
> > the crash even with maxcpus=1?
> >
>
> Actually Ingo, this happened on my UP test machine, a 368MHz Pentium.
>
> But unfortunately, it so far only happened once, and I've been trying to
> recreate it, with no success. The test that crashed it was running 10
> tasks that would read the entire filesystem. I was debugging another bug
> (something specific to my kernel, or maybe -rt) when I hit this bug.
> Looking at it, it seemed to not be related to the changes I made. Perhaps
> it could be related to your changes?
>


I normally test the sysfs races by running these two loops simultenously
on a SMP box. Basically running these will create/delete sysfs files and
directories and also do readdir.

while true; do insmod drivers/net/dummy.ko; rmmod dummy; done
while true; do find /sys/class/net/dummy0/ | xargs cat > /dev/null; done


--
Maneesh Soni
Linux Technology Center,
IBM India Software Labs,
Bangalore, India
email: maneesh@xxxxxxxxxx
Phone: 91-80-25044990
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/