Re: nbd locking problems
From: Soren Hansen
Date: Fri Jan 28 2011 - 18:12:11 EST
2011/1/28 Serge E. Hallyn <serge@xxxxxxxxxx>:
> Thanks for looking into this, Soren.
> As Dave just explained to me, BKL is released when you sleep :)
Ah, yes, that makes perfect sense.
>ÂI assume that's how it gets released around the kthread_create(). ÂI
> *think* you're right that the new mutex is superfluous, but I'd like to
> look through the ioctl code and make sure there's no shared state which
> we need to protect.
Yup, I've tried that and I didn't find anything, but this is very new
territory to me, so more eyes sounds great.
> I don't see how there could be, or rather, if there
> were, then it was broken before.
> In the meantime, could you please post your patch? Â(Is it the
> three-liner I'd expect?)
Indeed it is. I was holding off on posting it, because I was hoping
Pavel Machek would chime in. Pavel's commit message in  suggested
that there was more work to do before the BKL could be vanquished from
this driver (by changing .ioctl to .unlocked_ioctl).
I guess it can't hurt to post it, though. I'll do that in a second.
Soren Hansen Â Â Â Â| http://linux2go.dk/
Ubuntu Developer Â Â| http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/
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/