lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 5/6] procfs: Push down the bkl from ioctl
From
On Tue, Mar 30, 2010 at 9:20 AM, Frederic Weisbecker <fweisbec@gmail.com> wrote:

> --- a/net/sunrpc/cache.c
> +++ b/net/sunrpc/cache.c
> @@ -1331,12 +1331,22 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait)
>        return cache_poll(filp, wait, cd);
>  }
>
> -static int cache_ioctl_procfs(struct inode *inode, struct file *filp,
> -                             unsigned int cmd, unsigned long arg)
> +static long cache_ioctl_procfs(struct file *filp,
> +                              unsigned int cmd, unsigned long arg)
>  {
> -       struct cache_detail *cd = PDE(inode)->data;
> +       long ret;
> +       struct cache_detail *cd;
> +       struct inode *inode = filp->f_path.dentry->d_inode;
>
> -       return cache_ioctl(inode, filp, cmd, arg, cd);
> +       /* Pushed down from procfs ioctl handler */
> +       lock_kernel();
> +
> +       cd = PDE(inode)->data;

->data is not under BKL at all.

> +       ret = cache_ioctl(inode, filp, cmd, arg, cd);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-03-30 08:33    [W:2.009 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site