Skip to contentSkip to conversation

2.6.10-rc[2|3] protection fault on /proc/devices

DISCUSSION Georg Schild 3 participants 7 messages Dec 6, 2004 – Dec 7, 2004 Block layer

lore
Share & tools
lore
#0 lore raw

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

Regards

Georg Schild

Quoted 56 lines

kjournald starting. Commit interval 5 seconds EXT3 FS on hda10, internal journal
EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hda11, internal journal
EXT3-fs: mounted filesystem with ordered data mode.

general protection fault: 0000 [1]
CPU 0
Modules linked in:
Pid: 5693, comm: grep Not tainted 2.6.10-rc3
RIP: 0010:[<ffffffff8028c5b5>] <ffffffff8028c5b5>{get_blkdev_list+85}
RSP: 0018:000001001eec1e48  EFLAGS: 00010202
RAX: 000000000000000c RBX: 6d736f2d636f7270 RCX: 0000000000000000
RDX: ffffffff804332e2 RSI: fffffffffffffffe RDI: ffffffff804332e2
RBP: 0000000000000048 R08: 00000000ffffffff R09: 0000000000000009
R10: 00000000ffffffff R11: 0000000000000000 R12: 000001001f248139
R13: 000000000000000b R14: 0000000000000c00 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffffffff805f71c0(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000002a95725f60 CR3: 0000000000101000 CR4: 00000000000006e0
Process grep (pid: 5693, threadinfo 000001001eec0000, task 000001001e80f0b0)
Stack: 0000000000000003 0000000000000139 000001001eec1ed8 000001001f248000
       000001001eec1ed4 ffffffff80186903 000001001ec4be80 0000000000000000
       000001001f248000 0000000000000c00
Call Trace:<ffffffff80186903>{devices_read_proc+67} <ffffffff801841ba>{proc_file_read+234}
       <ffffffff80158ac7>{vfs_read+199} <ffffffff80158d73>{sys_read+83}
       <ffffffff8010e12a>{system_call+126}

Code: 8b 53 08 48 8d 4b 0c 48 63 fd 4c 01 e7 48 c7 c6 db 32 43 80
RIP <ffffffff8028c5b5>{get_blkdev_list+85} RSP <000001001eec1e48>
 <0>general protection fault: 0000 [2]
CPU 0
Modules linked in:
Pid: 12088, comm: cardmgr Not tainted 2.6.10-rc3
RIP: 0010:[<ffffffff8028c5b5>] <ffffffff8028c5b5>{get_blkdev_list+85}
RSP: 0018:000001001ef97e48  EFLAGS: 00010202
RAX: 000000000000000c RBX: 6d736f2d636f7270 RCX: 0000000000000000
RDX: ffffffff804332e2 RSI: fffffffffffffffe RDI: ffffffff804332e2
RBP: 0000000000000048 R08: 00000000ffffffff R09: 0000000000000009
R10: 00000000ffffffff R11: 0000000000000000 R12: 000001001ea9f139
R13: 000000000000000b R14: 0000000000000400 R15: 0000000000000000
FS:  0000000000519ae0(0000) GS:ffffffff805f71c0(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000002a956cb5c0 CR3: 0000000000101000 CR4: 00000000000006e0
Process cardmgr (pid: 12088, threadinfo 000001001ef96000, task 000001001f2ac910)
Stack: 0000000000100073 0000000000000139 000001001ef97ed8 000001001ea9f000
       000001001ef97ed4 ffffffff80186903 000001001e12f480 0000000000000000
       000001001ea9f000 0000000000000400
Call Trace:<ffffffff80186903>{devices_read_proc+67} <ffffffff801841ba>{proc_file_read+234}
       <ffffffff80158ac7>{vfs_read+199} <ffffffff80158d73>{sys_read+83}
       <ffffffff8010e12a>{system_call+126}

Code: 8b 53 08 48 8d 4b 0c 48 63 fd 4c 01 e7 48 c7 c6 db 32 43 80

RIP <ffffffff8028c5b5>{get_blkdev_list+85} RSP <000001001ef97e48>
<6>tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is on for TX and on for RX.

#1 lore raw
Quoted 10 lines · Georg Schild

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

Quoted 33 lines

Regards

Georg Schild

Quoted 29 lines

kjournald starting. Commit interval 5 seconds EXT3 FS on hda10, internal journal
EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hda11, internal journal
EXT3-fs: mounted filesystem with ordered data mode.

general protection fault: 0000 [1]
CPU 0
Modules linked in:
Pid: 5693, comm: grep Not tainted 2.6.10-rc3
RIP: 0010:[<ffffffff8028c5b5>] <ffffffff8028c5b5>{get_blkdev_list+85}
RSP: 0018:000001001eec1e48  EFLAGS: 00010202
RAX: 000000000000000c RBX: 6d736f2d636f7270 RCX: 0000000000000000
RDX: ffffffff804332e2 RSI: fffffffffffffffe RDI: ffffffff804332e2
RBP: 0000000000000048 R08: 00000000ffffffff R09: 0000000000000009
R10: 00000000ffffffff R11: 0000000000000000 R12: 000001001f248139
R13: 000000000000000b R14: 0000000000000c00 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffffffff805f71c0(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000002a95725f60 CR3: 0000000000101000 CR4: 00000000000006e0
Process grep (pid: 5693, threadinfo 000001001eec0000, task 000001001e80f0b0)
Stack: 0000000000000003 0000000000000139 000001001eec1ed8 000001001f248000
       000001001eec1ed4 ffffffff80186903 000001001ec4be80 0000000000000000
       000001001f248000 0000000000000c00
Call Trace:<ffffffff80186903>{devices_read_proc+67} <ffffffff801841ba>{proc_file_read+234}
       <ffffffff80158ac7>{vfs_read+199} <ffffffff80158d73>{sys_read+83}
       <ffffffff8010e12a>{system_call+126}

Code: 8b 53 08 48 8d 4b 0c 48 63 fd 4c 01 e7 48 c7 c6 db 32 43 80

How odd. All I can think is that something has registered a zillion devices and get_blkdev_list() has run off the /proc page. But then, it should have oopsed in sprintf()..

Still. Please send a copy of your /proc/devices from 2.6.10-rc1 and also apply this:

drivers/block/genhd.c renamed from drivers/block/genhd.c~a +4 -2
@@ -48,9 +48,11 @@ int get_blkdev_list(char *p)
 
 	down_read(&block_subsys.rwsem);
 	for (i = 0; i < ARRAY_SIZE(major_names); i++) {
-		for (n = major_names[i]; n; n = n->next)
-			len += sprintf(p+len, "%3d %s\n",
+		for (n = major_names[i]; n; n = n->next) {
+			if (len < PAGE_SIZE / 2)
+				len += sprintf(p+len, "%3d %s\n",
 				       n->major, n->name);
+		}
 	}
 	up_read(&block_subsys.rwsem);
 

_

to 2.6.10-rc3 and see if that fixes it. If so, please send the /proc/devices content from this kernel.

Beyond that, perhaps something scribbled on the data structures in there. Setting CONFIG_SLAB_DEBUG and/or CONFIG_DEBUG_PAGEALLOC might turn something up.

#2 lore raw
Quoted 36 lines · Andrew Morton
Quoted 7 lines · Georg Schild

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

Regards

Georg Schild

How odd. All I can think is that something has registered a zillion devices and get_blkdev_list() has run off the /proc page. But then, it should have oopsed in sprintf()..

Still. Please send a copy of your /proc/devices from 2.6.10-rc1 and also apply this:

drivers/block/genhd.c renamed from drivers/block/genhd.c~a +4 -2
@@ -48,9 +48,11 @@ int get_blkdev_list(char *p)
 
 	down_read(&block_subsys.rwsem);
 	for (i = 0; i < ARRAY_SIZE(major_names); i++) {
-		for (n = major_names[i]; n; n = n->next)
-			len += sprintf(p+len, "%3d %s\n",
+		for (n = major_names[i]; n; n = n->next) {
+			if (len < PAGE_SIZE / 2)
+				len += sprintf(p+len, "%3d %s\n",
 				       n->major, n->name);
+		}
 	}
 	up_read(&block_subsys.rwsem);
 

_

Quoted 5 lines

to 2.6.10-rc3 and see if that fixes it. If so, please send the /proc/devices content from this kernel.

Beyond that, perhaps something scribbled on the data structures in there. Setting CONFIG_SLAB_DEBUG and/or CONFIG_DEBUG_PAGEALLOC might turn something up.

Okay, here the output of /proc/devices on 2.6.10-rc1. I will apply the patch and see if it works.

regards

Georg Schild

Quoted 58 lines

Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
6 lp
7 vcs
10 misc
13 input
14 sound
21 sg
29 fb
81 video4linux
89 i2c
116 alsa
128 ptm
136 pts
161 ircomm
162 raw
171 ieee1394
180 usb
202 cpu/msr
203 cpu/cpuid
216 rfcomm
253 devfs
254 pcmcia

Block devices:
2 fd
3 ide0
7 loop
8 sd
11 sr
22 ide1
43 nbd
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
80 i2o_block
125 ub
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
254 mmc

#3 lore raw
In reply to Andrew Morton
Quoted 9 lines · Andrew Morton
Quoted 3 lines · Georg Schild

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

How odd. All I can think is that something has registered a zillion devices and get_blkdev_list() has run off the /proc page. But then, it should have oopsed in sprintf()..

Quoted 8 lines

Still. Please send a copy of your /proc/devices from 2.6.10-rc1 and also apply this:

to 2.6.10-rc3 and see if that fixes it. If so, please send the /proc/devices content from this kernel.

Beyond that, perhaps something scribbled on the data structures in there. Setting CONFIG_SLAB_DEBUG and/or CONFIG_DEBUG_PAGEALLOC might turn something up.

I have tried now with applied patch against the vanilla-sources, that means without the wbsd-patch, nothing changed. same is with the wbsd-patch. i did a complete rebuild (make clean etc.) everytime. How can i enable some debugging?

#5 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 2 lines · Georg Schild

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

Beyond that, perhaps something scribbled on the data structures in there. Setting CONFIG_SLAB_DEBUG and/or CONFIG_DEBUG_PAGEALLOC might turn something up.

I don't know what caused the kernel to give up baging me but it did. I enabled CONFIG_DEBUG_SLAB and CONFIG_KERNEL_DEBUG and now everything works okay. I have inserted the patch you gave me and the wbsd-patch is inserted too, everything works now, don't know why, i can cat /proc/devices too. Loading modules is not a problem too.

Quoted 59 lines

cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
6 lp
7 vcs
10 misc
13 input
14 sound
21 sg
29 fb
81 video4linux
89 i2c
116 alsa
128 ptm
136 pts
161 ircomm
162 raw
171 ieee1394
180 usb
202 cpu/msr
203 cpu/cpuid
216 rfcomm
253 devfs
254 pcmcia

Block devices:
2 fd
3 ide0
7 loop
8 sd
11 sr
22 ide1
43 nbd
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
80 i2o_block
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
180 ub
254 mmc

#4 lore raw
In reply to Georg Schild

(Please don't edit the email headers - just do reply-to-all)

Quoted 24 lines · Georg Schild
Quoted 22 lines · Andrew Morton
Quoted 10 lines · Georg Schild

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

How odd. All I can think is that something has registered a zillion devices and get_blkdev_list() has run off the /proc page. But then, it should have oopsed in sprintf()..

Still. Please send a copy of your /proc/devices from 2.6.10-rc1 and also apply this:

to 2.6.10-rc3 and see if that fixes it. If so, please send the /proc/devices content from this kernel.

Quoted 9 lines
Quoted 3 lines

Beyond that, perhaps something scribbled on the data structures in there. Setting CONFIG_SLAB_DEBUG and/or CONFIG_DEBUG_PAGEALLOC might turn something up.

I have tried now with applied patch against the vanilla-sources, that means without the wbsd-patch, nothing changed. same is with the wbsd-patch. i did a complete rebuild (make clean etc.) everytime. How can i enable some debugging?

make menuconfig
-> Kernel Hacking
-> enable Debug memory allocations

#6 lore raw
In reply to Andrew Morton

Hello,

I have some similar problem. I use 2.6.10-rc2-mm3 kernel. For some reason i can't read /proc/modules

31222 ?        D      0:00 lsmod
31243 ?        D      0:00 cat /proc/modules

This is what remained in memory after i tryed to see modules list. I also had some problem with this kernel after i loaded iptables_nat, and unload it and also unload the ip_conntrack module and after that i got some OOPS, and then a nice panic. I mailed after that to this list.

Quoted 86 lines · Andrew Morton
Quoted 10 lines · Georg Schild

Since 2.6.10-rc2 I am having problems accessing /proc/devices. On startup some init-skripts access this node and print out a protection fault. i am having this on pcmcia and swap startup. My system is an amd64 @3000+ in an Acer Aspire 1501Lmi at 64bit mode running gentoo. .config is the same as on 2.6.10-rc1 which works good. cat on /proc/devices gives the same problems. The kernel has just a patch for wbsd (builtin mmc-cardreader) from Pierre Ossman in use, everything else is vanilla. Does anyone know of this issue and perhaps on how to solve this?

Quoted 33 lines

Regards

Georg Schild

Quoted 29 lines

kjournald starting. Commit interval 5 seconds EXT3 FS on hda10, internal journal
EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hda11, internal journal
EXT3-fs: mounted filesystem with ordered data mode.

general protection fault: 0000 [1]
CPU 0
Modules linked in:
Pid: 5693, comm: grep Not tainted 2.6.10-rc3
RIP: 0010:[<ffffffff8028c5b5>] <ffffffff8028c5b5>{get_blkdev_list+85}
RSP: 0018:000001001eec1e48  EFLAGS: 00010202
RAX: 000000000000000c RBX: 6d736f2d636f7270 RCX: 0000000000000000
RDX: ffffffff804332e2 RSI: fffffffffffffffe RDI: ffffffff804332e2
RBP: 0000000000000048 R08: 00000000ffffffff R09: 0000000000000009
R10: 00000000ffffffff R11: 0000000000000000 R12: 000001001f248139
R13: 000000000000000b R14: 0000000000000c00 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffffffff805f71c0(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000002a95725f60 CR3: 0000000000101000 CR4: 00000000000006e0
Process grep (pid: 5693, threadinfo 000001001eec0000, task 000001001e80f0b0)
Stack: 0000000000000003 0000000000000139 000001001eec1ed8 000001001f248000
       000001001eec1ed4 ffffffff80186903 000001001ec4be80 0000000000000000
       000001001f248000 0000000000000c00
Call Trace:<ffffffff80186903>{devices_read_proc+67} <ffffffff801841ba>{proc_file_read+234}
       <ffffffff80158ac7>{vfs_read+199} <ffffffff80158d73>{sys_read+83}
       <ffffffff8010e12a>{system_call+126}

Code: 8b 53 08 48 8d 4b 0c 48 63 fd 4c 01 e7 48 c7 c6 db 32 43 80

How odd. All I can think is that something has registered a zillion devices and get_blkdev_list() has run off the /proc page. But then, it should have oopsed in sprintf()..

Still. Please send a copy of your /proc/devices from 2.6.10-rc1 and also apply this:

drivers/block/genhd.c 2004-12-06 23:31:30.539913048 -0800 renamed from drivers/block/genhd.c~a 2004-12-06 23:31:13.677476528 -0800 +4 -2
@@ -48,9 +48,11 @@ int get_blkdev_list(char *p)
 
        down_read(&block_subsys.rwsem);
        for (i = 0; i < ARRAY_SIZE(major_names); i++) {
-               for (n = major_names[i]; n; n = n->next)
-                       len += sprintf(p+len, "%3d %s\n",
+               for (n = major_names[i]; n; n = n->next) {
+                       if (len < PAGE_SIZE / 2)
+                               len += sprintf(p+len, "%3d %s\n",
                                       n->major, n->name);
+               }
        }
        up_read(&block_subsys.rwsem);
 

_

to 2.6.10-rc3 and see if that fixes it. If so, please send the /proc/devices content from this kernel.

Beyond that, perhaps something scribbled on the data structures in there. Setting CONFIG_SLAB_DEBUG and/or CONFIG_DEBUG_PAGEALLOC might turn something up.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 1 line
Bla bla