Re: [announce] vfs-scale git tree update

From: Chris Ball
Date: Thu Jan 06 2011 - 21:03:39 EST


On Thu, Jan 06, 2011 at 05:41:39PM -0800, Linus Torvalds wrote:
> I'm wondering if this is a previously existing race condition leading
> to a deadlock. One that previously would have been serialized enough
> by the dcache lock that you'd never have that happen.
>
> It might be interesting to re-run it with mutex debugging and lockdep
> enabled, to see if that reports anything. Although it probably won't,
> because it's not about a plain lock dependency, but ends up being
> deadlocked on the uevent being finished (but you have the modprobe and
> the request_firmware ones waiting on each other).
>
> I dunno. I haven't really though that fully through. But we've had
> cases roughly like that before, and yes, they can be exposed by some
> independent serialization going away - long-standing potential bugs,
> that simply never happened in practice before.

Yeah, that sounds right:

arch/x86/kernel/microcode_core.c:
mutex_lock(&microcode_mutex);
...
error = sysdev_driver_register(&cpu_sysdev_class, &mc_sysdev_driver);

(which calls request_microcode_fw() indirectly, and goes out to userspace.)

I'm willing to have a try at making this lockless if no-one beats me to it,
although it would need to wait until I've got the MMC merge out of the way.

--
Chris Ball <cjb@xxxxxxxxxx> <http://printf.net/>
One Laptop Per Child
--
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/