lkml.org 
[lkml]   [2003]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [OOPS] less /proc/net/igmp
Hi Marcel,
I don't have the kernel, I didn't try it also, but I have faced
a similar problem sometimes back so I feel that it might be the same
problem. I have posted a similar question sometimes back on this list.
If you do an strace of both 'cat' and 'less' you will see that 'cat' does
not maintain the offset into the file in the application. It just believes
that subsequent reads will give data after the point it has read, 'less'(
as well as brother 'more')
on the other hand does an lseek(fd, last_read_return_value, SEEK_SET)
after every read, then it issues a read call.
Now if you see proc_file_read() in the kernel source, you will see that to
support proc files which are more than PAGE_SIZE long, they have a hack
that it allows the caller to interpret the offset not as byte offsets but
as anything, mostly number of records read ..
I feel ur /proc/net/igmp file is more than a PAGE_SIZE long, because that
is when this problem is more likely to happen, but it can happen otherwise
also if things are not handled properly.
The problem is probably in the proc_read function of /proc/net/igmp

Thanx
tomar




On Mon, 25 Aug 2003, Marcel Sebek wrote:

> This Oops appears on 2.5.74+ kernels (including 2.6.0-test4) when
> I'm trying to read /proc/net/igmp with 'less', 'cat' displays
> the file content without oops:
>
> LILO boot: linux init=/bin/bash
> ...
> [snip]
> ...
> bash# mount /proc
> bash# cat /proc/net/igmp
> Idx Device : Count Querier Group Users Timer Reporter
> bash# less /proc/net/igmp
> Idx Device : Count Querier Group Users Timer Reporter
> bash# ifup -a
> bash# cat /proc/net/igmp
> Idx Device : Count Querier Group Users Timer Reporter
> 1 lo : 0 V2
> 010000E0 1 0:FFFA22F0
> 0
> bash# less /proc/net/igmp
> Unable to handle kernel paging request at virtual address 08051be0
> printing eip:
> 08051be0
> *pde = 0fb66067
> *pfe = 00000000
> Oops: 0004 [#1]
> CPU: 0
> EIP: 0073:[<08051be0>] Not tainted
> EFLAGS: 00010246
> EIP is at 0x8051be0
> eax: 0805fb68 ebx: 00000001 ecx: 00000000 edx: 00000019
> esi: 08060649 edi: 08057543 ebp: bffffd8c esp: bfffda50
> ds: 007b es: 007b ss: 007b
> Process less (pid 20, threadinfo = cfab6000 task = c13560cd)
> <0>Kernel panic: Fatal exception in interrupt
> In interrupt handler - not syncing
>
>
> EIP points to the begin of the function clr_linenum() in
> less-374/linenum.c:78 (instruction 'push %ebp').
>
> Kernel is compiled by gcc-2.95.4 (20011002) from Debian woody.
> Less is from woody and also from the original sources.
>
>
>

-
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:48    [W:0.069 / U:1.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site