public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alexey Mikhailov <karma@galois.botik.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: lseek() on debugfs entries in 2.6.37
Date: Tue, 15 Mar 2011 15:36:42 -0400	[thread overview]
Message-ID: <20110315193642.GA19446@home.goodmis.org> (raw)
In-Reply-To: <874o74ilxl.wl%karma@galois.botik.ru>

On Tue, Mar 15, 2011 at 03:54:14PM +0300, Alexey Mikhailov wrote:
> Hello!
> 
> I use simple debugfs entries for user-space <-> kernel-space
> interaction. Basically I read unsigned integers from debugfs
> files like this:

What debugfs file? Is this something you created?

> 
>    ...
>    char buf[64];
>    lseek(timesync_fd, 0, SEEK_SET);
>    read(timesync_fd, buf, sizeof(buf));
>    ...
> 
> It works perfectly with 2.6.32 kernel. But with 2.6.37 kernel,
> lseek() fails with errno=29(Illegal seek). So second read()
> call just fails or returns garbage. Can someone please shed
> some light on it?
> 

There's been a lot of clean ups in the debugfs to patch lseek in files
that just didn't support it. Could be one of the files that got the
clean up. The lseek may have failed silently before, but now it
produceses an error.

-- Steve


      parent reply	other threads:[~2011-03-15 19:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 12:54 lseek() on debugfs entries in 2.6.37 Alexey Mikhailov
2011-03-15 14:01 ` Arnd Bergmann
2011-03-16 10:49   ` Alexey Mikhailov
2011-03-16 11:41     ` Arnd Bergmann
2011-03-15 19:36 ` Steven Rostedt [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=20110315193642.GA19446@home.goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=karma@galois.botik.ru \
    --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