Re: [PATCH] parport/ppdev: fix registration of sysctl entries

From: Al Viro
Date: Sat Jul 05 2008 - 20:12:25 EST


On Sun, Jul 06, 2008 at 12:51:48AM +0100, Al Viro wrote:

> I don't believe that it's right. Note that if you *do* race there, you
> are fucked regardless of sysctls - ppdev.c::register_device() racing
> with itself will do tons of fun things all by itself (starting with two
> threads allocating different pdev and both setting pp->pdev).
>
> IOW, *if* that's what we are hitting here, you've only papered over the
> visible symptom.

BTW, with your patch you'll have 100% reproducible double registration if
you do PPCLAIM/PPRELEASE/PPCLAIN on one file descriptor.
--
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/