Messages in this thread | | | Date | Sun, 6 Jul 2008 21:35:08 +0100 | From | Al Viro <> | Subject | Re: [PATCH] parport/ppdev: fix registration of sysctl entries |
| |
On Sun, Jul 06, 2008 at 05:07:02PM +0200, Marcin Slusarz wrote: > On Sun, Jul 06, 2008 at 01:11:48AM +0100, Al Viro wrote: > > 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). > > I wouldn't call it a race - BKL is protecting multiple ioctl calls, so we > won't ever claim the device from two different threads.
Yes, we can - register_device() does kmalloc() with GFP_KERNEL, which kills any protection from BKL. BKL is _not_ providing any kind of exclusion while you sleep.
| |