lkml.org 
[lkml]   [2008]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] uio BKL removal
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.



\
 
 \ /
  Last update: 2008-08-27 22:45    [W:0.066 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site