From: Arnd Bergmann <arnd@arndb.de>
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:01:41 +0100 [thread overview]
Message-ID: <201103151501.42105.arnd@arndb.de> (raw)
In-Reply-To: <874o74ilxl.wl%karma@galois.botik.ru>
On Tuesday 15 March 2011, Alexey Mikhailov wrote:
> I use simple debugfs entries for user-space <-> kernel-space
> interaction. Basically I read unsigned integers from debugfs
> files like this:
>
> ...
> 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?
This is probably a result of the changes I made as part of the
BKL removal. Which file specifically are you talking about?
In older kernels, having no .llseek function meant that you
implicitly get default_llseek. New kernels now require
that the driver explicitly chooses one llseek variant.
I did a patch to automatically convert all drivers, but
this patch may have missed some that got moved around
while I was patching them.
Arnd
next prev parent reply other threads:[~2011-03-15 14:01 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 [this message]
2011-03-16 10:49 ` Alexey Mikhailov
2011-03-16 11:41 ` Arnd Bergmann
2011-03-15 19:36 ` Steven Rostedt
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=201103151501.42105.arnd@arndb.de \
--to=arnd@arndb.de \
--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