Subject: kern/1244: [dM] "panic: kernel fault" when swread() calls physio()
To: None <gnats-bugs@gnats.netbsd.org>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 07/19/1995 10:41:25
>Number:         1244
>Category:       kern
>Synopsis:       [dM] "panic: kernel fault" when swread() calls physio()
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 19 10:50:01 1995
>Last-Modified:
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        NetBSD/sparc -current as of this morning's sup
>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
>Audit-Trail:
>Unformatted: