From: Andrew Morton <akpm@osdl.org>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Fw: [Bugme-new] [Bug 7189] New: Inconsistent /proc/fb behavior
Date: Fri, 22 Sep 2006 19:47:00 -0700 [thread overview]
Message-ID: <20060922194700.c581fa72.akpm@osdl.org> (raw)
Begin forwarded message:
Date: Fri, 22 Sep 2006 19:27:02 -0700
From: bugme-daemon@bugzilla.kernel.org
To: bugme-new@lists.osdl.org
Subject: [Bugme-new] [Bug 7189] New: Inconsistent /proc/fb behavior
http://bugzilla.kernel.org/show_bug.cgi?id=7189
Summary: Inconsistent /proc/fb behavior
Kernel Version: 2.6.17.13
Status: NEW
Severity: normal
Owner: jsimmons@infradead.org
Submitter: jurij@wooyd.org
Distribution: Debian unstable
Hardware environment: Sparc Ultra60 workstation
Problem Description:
It appears that the function fbmem_read_proc, which serves as a backend for the
/proc/fb file, has a problem. When constructing the list of available frame
buffers to return to the user, it uses the following for-cycle;
for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && len < 4000; fi++)
Here len is the parameter passed to the function, that it the amount of data the
user is requesting from the file. So if the user requests a chunk larger than
4000 bytes, nothing is returned, leading to the peculiar behaviour described below.
Steps to reproduce:
$ cat /proc/fb
0 Creator 3D
This works fine, because strace shows that cat is reading data in 1024-byte chunks:
[..]
read(3, "0 Creator 3D\n", 1024) = 13
OTOH, grep is reading data in 32kB chunks:
[..]
read(3, "", 32768) = 0
so the command 'grep Creator /proc/fb' returns nothing (quite unexpectingly). I
suspect that for-loop should have 'clen' rather than 'len', the local variable
which tracks the size of the buffer (even though I am not sure why one would
want to impose a 4000 byte limit here).
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
next reply other threads:[~2006-09-23 2:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-23 2:47 Andrew Morton [this message]
2006-09-24 10:31 ` Fw: [Bugme-new] [Bug 7189] New: Inconsistent /proc/fb behavior Geert Uytterhoeven
2006-09-26 20:58 ` Andrew Morton
2006-09-27 7:39 ` Jurij Smakov
2006-09-27 7:17 ` Willy Tarreau
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=20060922194700.c581fa72.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).