From: Alexey Dobriyan <adobriyan@sw.ru>
To: Arjan van de Ven <arjan@infradead.org>
Cc: akpm@osdl.org, Eric Dumazet <dada1@cosmosbay.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm] Fix lseek on /proc/kcore
Date: Wed, 28 Mar 2007 12:05:48 +0400 [thread overview]
Message-ID: <20070328080548.GA6651@localhost.sw.ru> (raw)
In-Reply-To: <1174569275.1158.175.camel@laptopd505.fenrus.org>
On Thu, Mar 22, 2007 at 02:14:35PM +0100, Arjan van de Ven wrote:
> On Thu, 2007-03-22 at 12:56 +0300, Alexey Dobriyan wrote:
> > --- a/fs/proc/inode.c
> > +++ b/fs/proc/inode.c
> > @@ -167,8 +167,9 @@ static loff_t proc_reg_llseek(struct fil
> > llseek = pde->proc_fops->llseek;
> > spin_unlock(&pde->pde_unload_lock);
> >
> > - if (llseek)
> > - rv = llseek(file, offset, whence);
> > + if (!llseek)
> > + llseek = default_llseek;
> > + rv = llseek(file, offset, whence);
> >
>
> this has potential impact way outside kcore......
>
> did you audit all proc users to see if they can deal with lseek?
Mainline deals with lseek on proc entries as follows:
* use default_llseek()
* but if proc entry set ->llseek via ->proc_fops, use custom llseek
With introduction of proxying, ->llseek was suddenly set on all proc
entries, so default_llseek() was never used, but -E started to be
returned for all of them that were relying on default_llseek().
So this patch brings proc_reg_llseek() in sync with vfs_llseek().
prev parent reply other threads:[~2007-03-28 8:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 9:56 [PATCH -mm] Fix lseek on /proc/kcore Alexey Dobriyan
2007-03-22 13:14 ` Arjan van de Ven
2007-03-28 8:05 ` Alexey Dobriyan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070328080548.GA6651@localhost.sw.ru \
--to=adobriyan@sw.ru \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox