Re: nbd: add locking to nbd_ioctl

From: Paul Clements
Date: Fri Jan 16 2009 - 10:24:36 EST

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.

What is the particular problem that this fixes? I thought we had already been careful to take tx_lock where necessary to protect data structures. Perhaps there is something I missed?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at