NetBSD Problem Report #1244
From gnats Wed Jul 19 10:42:09 1995
Received: from Collatz.McRCIM.McGill.EDU (root@Collatz.McRCIM.McGill.EDU [132.206.78.1]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id KAA11026 for <gnats-bugs@gnats.netbsd.org>; Wed, 19 Jul 1995 10:42:05 -0400
Message-Id: <199507191441.KAA15589@Collatz.McRCIM.McGill.EDU>
Date: Wed, 19 Jul 1995 10:41:25 -0400
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Reply-To: mouse@Collatz.McRCIM.McGill.EDU
To: gnats-bugs@gnats.netbsd.org
Subject: [dM] "panic: kernel fault" when swread() calls physio()
X-Send-Pr-Version: 3.2
>Number: 1244
>Category: kern
>Synopsis: [dM] "panic: kernel fault" when swread() calls physio()
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 19 14:50:01 +0000 1995
>Closed-Date: Wed Jul 19 15:55:44 +0000 1995
>Last-Modified: Wed Aug 07 21:41:59 +0000 2002
>Originator: der Mouse
>Release: NetBSD/sparc -current as of this morning's sup
>Organization:
Dis-
>Environment:
SPARC IPC, not that it makes any difference.
>Description:
Argument mismatch between physio() as defined in
kern/kern_physio.c and physio() as called by swread()/swwrite()
in vm/vm_swap.c. (sw*() is omitting the dev argument.)
>How-To-Repeat:
Wait till a process gets swapped out, then run "ps ax". Or
just cat /dev/drum > /dev/null, presumably.
>Fix:
The following fix was developed independently by me and mrg,
and appears to work for both of us. (I hope chris will forgive
me the unidiff; in this case I think it's actually easier to
understand than a regular context diff....)
--- /sources/current-usr-src/./sys/vm/vm_swap.c Tue Jul 11 14:59:32 1995
+++ /usr/src/./sys/vm/vm_swap.c Tue Jul 18 12:13:45 1995
@@ -271,7 +271,7 @@
struct uio *uio;
{
- return (physio(swstrategy, NULL, B_READ, minphys, uio));
+ return (physio(swstrategy, NULL, dev, B_READ, minphys, uio));
}
int
@@ -280,7 +280,7 @@
struct uio *uio;
{
- return (physio(swstrategy, NULL, B_WRITE, minphys, uio));
+ return (physio(swstrategy, NULL, dev, B_WRITE, minphys, uio));
}
/*
der Mouse
mouse@collatz.mcrcim.mcgill.edu
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: cgd
State-Changed-When: Wed Jul 19 11:55:44 EDT 1995
State-Changed-Why:
committed a fix for this earlier; bug report made the fix obvious.
also adding proto for physio(), but that's a (relatively large) can of
worms, as many things define minphys routines incorrectly...
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.