Re: [PATCH, RFC] uio BKL removal
From: Alexey Dobriyan
Date: Wed Aug 27 2008 - 16:43:48 EST
On Tue, Aug 26, 2008 at 05:15:32PM -0600, Jonathan Corbet wrote:
> UIO: BKL removal
>
> Remove the BKL from the UIO driver, and add complete locking where needed
> to serialize idr accesses.
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -47,6 +47,9 @@ static struct uio_class {
> struct class *class;
> } *uio_class;
>
> +/* Protect idr accesses */
You can rename it to uio_idr_mutex (it's mutex, dammit!) and put next to
uio_idr and avoid comment ;-) Or if locking around _pre_get() isn't
necessary you can actually make it spinlock ;-) Anyway, put it close.
> +static DEFINE_MUTEX(minor_lock);
Indeed, BKL protects nothing because of GFP_KERNEL allocation.
--
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/