[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100330070258.GB22419@nowhere>
Date: Tue, 30 Mar 2010 09:02:59 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
John Kacur <jkacur@...hat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Al Viro <viro@...iv.linux.org.uk>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 5/6] procfs: Push down the bkl from ioctl
On Tue, Mar 30, 2010 at 09:31:33AM +0300, Alexey Dobriyan wrote:
> On Tue, Mar 30, 2010 at 9:20 AM, Frederic Weisbecker <fweisbec@...il.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.
Yeah. It's a very rough pushdown, I haven't looked at any bit to figure
out what could need to be protected or not. I even did not know what does
PDE. So I kept a plain bkl path. I just thought any further thinking should
be done in a further patch.
But I can move the bkl after in this same patch if you prefer.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists