Date: Mon, 30 Oct 2000 22:18:48 -0800 (PST) From: iwaki@bc.niigata-u.ac.jp To: freebsd-gnats-submit@FreeBSD.org Subject: kern/22435: linprocfs causes system down and reboot Message-ID: <20001031061848.B000B37B479@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 22435
>Category: kern
>Synopsis: linprocfs causes system down and reboot
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 30 22:20:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Mamoru Iwaki
>Release: FreeBSD 4.1.1-STABLE
>Organization:
Niigata University
>Environment:
FreeBSD mi000.merlin.gs.niigata-u.ac.jp 4.1.1-STABLE FreeBSD 4.1.1-STABLE #0: Tue Oct 31 14:34:58 JST 2000 root@mi000.merlin.gs.niigata-u.ac.jp:/usr/obj/amd/mi004/home2/FreeBSD-src/stable4/src/sys/MI i386
>Description:
Using linprocfs on 4.1.1-STABLE system,
% cat /compat/linux/proc/stat
or
% cat /compat/linux/proc/uptime
cause a panic with the following message
Fatal trap 18: integer divide fault while in kernel mode
instruction pointer = 0x8:0xc0933030
stack pointer = 0x10:0xc60dddc8
frame pointer = 0x10:0xc60dde20
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 325 (cat)
interrupt mask = none
trap number = 18
panic: integer divide fault
and then the system reboots immediately. At least, this problem has
exist since 4.1.1-STABLE around 24 Oct., but around 17 Oct..
This is dangerous because every user can make system down easily.
I heard that the CURRENT around 28 Oct. works good with the same
operations, so this problem maybe exist only in 4.1.1-STABLE.
>How-To-Repeat:
Use the above commands on 4.1.1-STABLE around 24 Oct.
>Fix:
In private communication, assar@freebsd.org proposed the following
patch, which looks working well.
In src/sys/i386/linux/linprocfs,
--- linprocfs_misc.c.org Fri Sep 22 17:01:45 2000
+++ linprocfs_misc.c Tue Oct 31 10:10:18 2000
@@ -65,8 +65,8 @@
#include <i386/linux/linprocfs/linprocfs.h>
-#define T2J(x) (((x) * 100) / stathz)
-#define T2S(x) ((x) / stathz)
+#define T2J(x) (((x) * 100) / (stathz ? stathz : hz)) /* ticks to jiffies */
+#define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */
int
linprocfs_domeminfo(curp, p, pfs, uio)
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001031061848.B000B37B479>
