NetBSD Problem Report #38541
From martin@duskware.de Tue Apr 29 13:25:40 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id C165763B293
for <gnats-bugs@gnats.netbsd.org>; Tue, 29 Apr 2008 13:25:39 +0000 (UTC)
Message-Id: <20080429115227.EAF7A63B293@narn.NetBSD.org>
Date: Tue, 29 Apr 2008 11:52:27 +0000 (UTC)
From: QFH02545@nifty.com
Reply-To: QFH02545@nifty.com
To: netbsd-bugs-owner@NetBSD.org
Subject: a simple leakage in rtl8169.c rev1.102
X-Send-Pr-Version: www-1.0
>Number: 38541
>Category: kern
>Synopsis: a simple leakage in rtl8169.c rev1.102
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: tsutsui
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 29 13:30:00 +0000 2008
>Closed-Date: Tue Apr 29 14:30:38 +0000 2008
>Last-Modified: Tue Apr 29 14:30:38 +0000 2008
>Originator: HITOSHI OSADA
>Release: current (20080429)
>Organization:
>Environment:
NetBSD amd690g 4.99.62 NetBSD 4.99.62 (AMD690G) #6: Tue Apr 29 20:31:26 JST 2008 root@amd690g:/NetBSD-obj/src-obj/sys/arch/amd64/compile/AMD690G amd64
>Description:
A simple leakage for ``Split device_t/softc'' cause uvm_fault in mii_attach().
>How-To-Repeat:
boot a machine that has re(4).
>Fix:
Index: rtl8169.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl8169.c,v
retrieving revision 1.102
diff -u -r1.102 rtl8169.c
--- rtl8169.c 25 Apr 2008 11:27:19 -0000 1.102
+++ rtl8169.c 29 Apr 2008 11:47:48 -0000
@@ -187,9 +187,9 @@
}
static int
-re_gmii_readreg(struct device *self, int phy, int reg)
+re_gmii_readreg(device_t dev, int phy, int reg)
{
- struct rtk_softc *sc = (void *)self;
+ struct rtk_softc *sc = device_private(dev);
uint32_t rval;
int i;
>Release-Note:
>Audit-Trail:
From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38541 CVS commit: src/sys/dev/ic
Date: Tue, 29 Apr 2008 14:16:57 +0000 (UTC)
Module Name: src
Committed By: tsutsui
Date: Tue Apr 29 14:16:57 UTC 2008
Modified Files:
src/sys/dev/ic: rtl8169.c
Log Message:
Fix a leakage on device_t/softc split. PR kern/38541 from HITOSHI OSADA.
To generate a diff of this commit:
cvs rdiff -r1.102 -r1.103 src/sys/dev/ic/rtl8169.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: kern-bug-people->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Tue, 29 Apr 2008 23:30:38 +0900
Responsible-Changed-Why:
State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Tue, 29 Apr 2008 23:30:38 +0900
State-Changed-Why:
Fixed, thanks.
>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.