NetBSD Problem Report #37390

From jakllsch@terminus.kollasch.net  Thu Nov 15 17:03:14 2007
Return-Path: <jakllsch@terminus.kollasch.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 621A863B867
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 15 Nov 2007 17:03:14 +0000 (UTC)
Message-Id: <20071115170312.297E827717@terminus.kollasch.net>
Date: Thu, 15 Nov 2007 17:03:12 +0000 (UTC)
From: jakllsch@kollasch.net
Reply-To: jakllsch@kollasch.net
To: gnats-bugs@NetBSD.org
Subject: dk(4) and minphys()
X-Send-Pr-Version: 3.95

>Number:         37390
>Category:       kern
>Synopsis:       dk interacts badly with sd and maybe dk
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 15 17:05:14 +0000 2007
>Closed-Date:    Sat Jan 09 01:26:03 +0000 2010
>Last-Modified:  Sat Jan 09 01:30:01 +0000 2010
>Originator:     jakllsch@kollasch.net
>Release:        NetBSD 4.0_RC4
>Organization:
>Environment:
System: NetBSD terminus.kollasch.net 4.0_RC4 NetBSD 4.0_RC4 (TERMINUS) #0: Sat Nov 10 17:37:37 UTC 2007 root@terminus.kollasch.net:/usr/src/sys/arch/i386/compile/TERMINUS i386
Architecture: i386
Machine: i386
>Description:

I've discovered that accessing a dk(4) character device
backed by a sd(4) doesn't work. I believe this may also
be the case with ld(4).

Anyway, the failure happens at the first line of
sdminphys(), it's not returning a valid sd_softc.
I believe bp->b_dev is in this case not a sd(4),
but a dk(4).

>How-To-Repeat:

 1. attach a sd0
 2. attach a sd1
 3. detach sd0
 4. add a wedge (dk0) to sd1 
 5. read from (or write to) /dev/rdk0
 6. see the page fault in sdminphys()

>Fix:

complicated

>Release-Note:

>Audit-Trail:
From: "Jonathan A. Kollasch" <jakllsch@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37390 CVS commit: src/sys/dev/dkwedge
Date: Sun, 27 Dec 2009 01:37:17 +0000

 Module Name:	src
 Committed By:	jakllsch
 Date:		Sun Dec 27 01:37:17 UTC 2009

 Modified Files:
 	src/sys/dev/dkwedge: dk.c

 Log Message:
 Implement and use a dkminphys() that calls the parent device's minphys
 function with b_dev temporarily adjusted to the parent device's dev_t.

 Fixes PR/37390.


 To generate a diff of this commit:
 cvs rdiff -u -r1.51 -r1.52 src/sys/dev/dkwedge/dk.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Sun, 27 Dec 2009 02:36:29 +0000
State-Changed-Why:
pullup-5 #1213


State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sat, 09 Jan 2010 01:26:03 +0000
State-Changed-Why:
Pulled up.


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37390 CVS commit: [netbsd-5] src/sys/dev/dkwedge
Date: Sat, 9 Jan 2010 01:25:11 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sat Jan  9 01:25:11 UTC 2010

 Modified Files:
 	src/sys/dev/dkwedge [netbsd-5]: dk.c

 Log Message:
 Pull up following revision(s) (requested by jakllsch in ticket #1213):
 	sys/dev/dkwedge/dk.c: revision 1.52
 Implement and use a dkminphys() that calls the parent device's minphys
 function with b_dev temporarily adjusted to the parent device's dev_t.
 Fixes PR/37390.


 To generate a diff of this commit:
 cvs rdiff -u -r1.42 -r1.42.6.1 src/sys/dev/dkwedge/dk.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.