Al Viro wrote: > On Fri, Feb 13, 2009 at 06:41:35AM +0000, Al Viro wrote: > > Aaaargh... > > /* > * We don't have to hold all of the locks at the > * same time here because we know that we're the > * last reference to mnt and that no new writers > * can come in. > */ > for_each_possible_cpu(cpu) { > struct mnt_writer *cpu_writer = &per_cpu(mnt_writers, cpu); > if (cpu_writer->mnt != mnt) > continue; > spin_lock(&cpu_writer->lock); > > is *almost* OK. Modulo SMP cache coherency. We know that nothing should > be setting ->mnt to ours anymore, that's fine. But we do not know if > we'd seen *earlier* change done on CPU in question (not the one we > are running __mntput() on). > > I probably would still like to use milder solution in the long run, but for > now let's check if turning that into > > struct mnt_writer *cpu_writer = &per_cpu(mnt_writers, cpu); > spin_lock(&cpu_writer->lock); > if (cpu_writer->mnt != mnt) { > spin_unlock(&cpu_writer->lock); > continue; > } > prevents the problem, OK? > Sure, I'll try. :) BTW, thread2's rmdir failed: rmdir: /cgroup/0: No such file or directory _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers