lkml.org 
[lkml]   [2003]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectBUG: cpufreq_proc_read give prematures eof for /proc/cpufreq (in 2.4.x-ac and 2.5)
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.023 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site