linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: cpufreq_proc_read give prematures eof for /proc/cpufreq (in 2.4.x-ac and 2.5)
@ 2003-05-05  0:43 Ricardo Galli
  0 siblings, 0 replies; only message in thread
From: Ricardo Galli @ 2003-05-05  0:43 UTC (permalink / raw)
  To: linux-kernel

If a process reads from /proc/cpufreq with a small buffer, i.e. count < 
len, the function return always eof because len is always zero if the 
offset is > 0:

static int cpufreq_proc_read (
    char            *page,
...
{
    char            *p = page;
...

    if (off != 0)
        goto end;
    ...

end:
    len = (p - page);

where p = page.


Is this bug intentional to avoid overload or it's really a mistake?

PS: there is an obvious fix, I didn't attached to avoid you flaming me. 
:-)
    
-- 
  ricardo galli       GPG id C8114D34

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-05  0:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05  0:43 BUG: cpufreq_proc_read give prematures eof for /proc/cpufreq (in 2.4.x-ac and 2.5) Ricardo Galli

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).