All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sandip Bhattacharya <sandip@webyarn.com>
To: linux-kernel@vger.kernel.org
Subject: procfs feature or bug?
Date: Wed, 19 Sep 2001 15:53:32 +0530	[thread overview]
Message-ID: <20010919155332.A980@mindsw.com> (raw)

[Do cc me replies. Thanks.]

Hi!

I was trying out the multipage procfs entries, when i found out that i
was having a problem.  

I am trying to use the "hack" by Paul Russell to allow mangling of
filepos using ``*start'' entries as my personal page offset. Now, for
multipage entries, whatever i set as *start should be coming back to
me as offset when the next page is called.

But in fs/proc/generic.c in proc_file_read() at the end we have (
after the first page has been "copied_to_user")

 *ppos += start < page ? (long) start : n;

But this _adds_ the contents of start to the offset, in the case where
I am supplying the offset in ``start''. Shouldn't this just be
_replacing_ ? 'Cause in this case the offsets get cumulatively added,
causing an oops at the end for me :(

Or am I missing something big???

- Sandip

--
-----------------------------------------------------------
Sandip Bhattacharya
Office: sandip@mindsw.com       Home: sandipb@bigfoot.com
Mindframe Software
-----------------------------------------------------------

             reply	other threads:[~2001-09-19 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-19 10:23 Sandip Bhattacharya [this message]
2001-09-19 16:19 ` procfs feature or bug? Jonathan Lundell

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=20010919155332.A980@mindsw.com \
    --to=sandip@webyarn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.