Re: nbd: add locking to nbd_ioctl

From: Pavel Machek
Date: Fri Jan 16 2009 - 07:06:46 EST


On Fri 2009-01-16 12:55:12, Pavel Machek wrote:
>
> The code was written with "oh big kernel lock, please protect me from
> all the evil" mentality: it does not locks its own data structures, it
> just hopes that big kernel lock somehow helps.
>
> It does not. (My fault).
>
> So this uses tx_lock to protect data structures from concurrent use
> between ioctl and worker threads.
>
> Signed-off-by: Pavel Machek <pavel@xxxxxxx>

Ok, it should return -EINVAL at the end of __nbd_ioctl. But Paul, does
it look ok otherwise?

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/