Re: [PATCH 5/6] procfs: Push down the bkl from ioctl
From: Alexey Dobriyan
Date: Tue Mar 30 2010 - 02:31:39 EST
On Tue, Mar 30, 2010 at 9:20 AM, Frederic Weisbecker <fweisbec@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/