Messages in this thread Patch in this message | | | Date | Thu, 21 May 1998 01:35:20 +0200 | From | Kurt Garloff <> | Subject | [PATCH] procps-1.2.7: oops and fix |
| |
Hi,
my kernel is highly modularized, so a lot of kernel functions are loaded as modules. procps-1.2.7 will fail on an "ps axl" and segv in find_func (). An easy patch would check for out of range kernel syms and return &0. I did a little more work and added a function to look in /proc/ksyms for the relevant address. [Patch appended]
My gpm-root waits in unix_data_wait which is normally not exported by the kernel. I changed this: --- linux/net/unix/af_unix.c~ Thu May 21 01:29:51 1998 +++ linux/net/unix/af_unix.c Thu May 21 01:29:54 1998 @@ -1110,7 +1110,7 @@ * Sleep until data has arrive. But check for races.. */ -static void unix_data_wait(unix_socket * sk) +void unix_data_wait(unix_socket * sk) { if (!skb_peek(&sk->receive_queue)) {
... and see what the modified "ps axl" shows: FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND 100 0 1 0 0 0 840 404 do_select S ? 0:02 init [3] 40 0 2 1 0 0 0 0 bdflush SW ? 0:00 (kflushd) 40 0 3 1 4 4 0 0 kswapd SWN ? 0:00 (kswapd) 140 0 14 1 0 0 804 212 sigsuspend S ? 0:00 update (bdflush) 140 0 129 1 0 0 1024 548 syslog S ? 0:00 /usr/sbin/klogd -c 3 140 0 131 1 0 0 836 408 do_select S ? 0:00 /usr/sbin/syslogd 100140 0 132 1 0 0 824 412 do_select S ? 0:00 /usr/sbin/apmd 140 0 148 1 0 0 844 396 do_select S ? 0:00 gpm -t ps2 -m /dev/mouse 100040 0 150 1 0 0 1104 468 unix_data_w S ? 0:00 gpm-root ^^^^^^^^^^^ Here is "ps axln" FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND 100 0 1 0 0 0 840 404 8012cd8d S ffff 0:02 init [3] ... 140 0 148 1 0 0 844 396 8012cd8d S ffff 0:00 gpm -t ps2 -m /dev/mouse 100040 0 150 1 0 0 1104 468 84833497 S ffff 0:00 gpm-root ^^^^^^^^ which is an address inside the module unix. -- Kurt Garloff, Dortmund <K.Garloff@ping.de> PGP key on http://student.physik.uni-dortmund.de/homepages/garloff
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |