Re: [NBD] Use per-device semaphore instead of BKL

From: Herbert Xu
Date: Sun Nov 20 2005 - 15:43:19 EST


On Sun, Nov 20, 2005 at 12:19:17PM -0500, Paul Clements wrote:
>
> The dropping of the lock in nbd_do_it is actually critical to the way
> nbd functions. nbd_do_it runs for the lifetime of the nbd device, so if
> nbd_do_it were holding some lock (BKL or otherwise), we'd have big problems.

Why would you want to issue an ioctl from a different process while
nbd-client is still running?

Allow ioctl's while nbd_do_it is in progress is a *serious* bug. For a
start, if someone else clears the socket then nbd_read_stat will crash.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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/