NetBSD Problem Report #51151

From gson@gson.org  Wed May 18 15:39:49 2016
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1FB067A3DA
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 18 May 2016 15:39:49 +0000 (UTC)
Message-Id: <20160518153944.62130744682@guava.gson.org>
Date: Wed, 18 May 2016 18:39:44 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: athn panic on attach
X-Send-Pr-Version: 3.95

>Number:         51151
>Category:       kern
>Synopsis:       athn panic on attach
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 18 15:40:00 +0000 2016
>Closed-Date:    Wed Dec 28 16:36:59 +0000 2016
>Last-Modified:  Wed Dec 28 16:36:59 +0000 2016
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date 2016.05.16.09.53.59
>Organization:

>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:

When I plug in a Comfast CF-WU871N USB Wireless Adapter, the
athn driver immediately panics:

athn0 at uhub13 port 2
uvm_fault(0xffffffff812f72e0, 0x0, 2) -> e
fatal page fault in supervisor mode
trap type 6 code 2 rip ffffffff80397220 cs 8 rflags 10286 cr2 0 ilevel 4 rsp fffffe8045fa1b00
curlwp 0xfffffe8045e8ca60 pid 0.78 lowest kstack 0xfffffe8045f9e2c0
panic: trap
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
trap() at netbsd:trap+0xc4b
--- trap (number 6) ---
athn_usb_htc_msg.part.8() at netbsd:athn_usb_htc_msg.part.8+0x1c
athn_usb_htc_connect_svc() at netbsd:athn_usb_htc_connect_svc+0xbc
athn_usb_attachhook() at netbsd:athn_usb_attachhook+0x298
athn_usb_attach() at netbsd:athn_usb_attach+0x395
config_attach_loc() at netbsd:config_attach_loc+0x17a
config_found_sm_loc() at netbsd:config_found_sm_loc+0x48
usbd_attachwholedevice() at netbsd:usbd_attachwholedevice+0x8e
usbd_probe_and_attach() at netbsd:usbd_probe_and_attach+0x24
usbd_new_device() at netbsd:usbd_new_device+0x395
uhub_explore() at netbsd:uhub_explore+0x2f4
usb_discover.isra.2() at netbsd:usb_discover.isra.2+0x4e
usb_event_thread() at netbsd:usb_event_thread+0x7c
cpu0: End traceback...

>How-To-Repeat:

See above.

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Sun, 11 Dec 2016 09:07:33 +0000
Responsible-Changed-Why:
Take


From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51151 CVS commit: src/sys/dev/usb
Date: Sun, 11 Dec 2016 15:01:37 +0000

 Module Name:	src
 Committed By:	skrll
 Date:		Sun Dec 11 15:01:37 UTC 2016

 Modified Files:
 	src/sys/dev/usb: if_athn_usb.c if_athn_usb.h

 Log Message:
 Fix some bugs introduced by the nick-nhusb merge and related to the
 Tx Interrupt pipe transfer handling

 While I'm here make some other changes moving towards MPification

 PR/51151: athn panic on attach
 PR/51458: usb athn panic


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/if_athn_usb.c
 cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_athn_usb.h

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

State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sun, 11 Dec 2016 15:07:24 +0000
State-Changed-Why:
Should be fixed now with
src/sys/dev/usb/if_athn_usb.c:1.18
src/sys/dev/usb/if_athn_usb.h:1.4
Please test and report back


From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@NetBSD.org
Cc: skrll@NetBSD.org,
    roy@NetBSD.org
Subject: Re: kern/51151 (athn panic on attach)
Date: Mon, 12 Dec 2016 18:40:58 +0200

 skrll@NetBSD.org wrote:
 > Synopsis: athn panic on attach
 > Should be fixed now with
 > src/sys/dev/usb/if_athn_usb.c:1.18
 > src/sys/dev/usb/if_athn_usb.h:1.4
 > Please test and report back

 I would like to, but my setup for testing -current on physical
 hardware is currently inoperative because of PR 51531 (hi roy!).
 -- 
 Andreas Gustafsson, gson@gson.org

From: Andreas Gustafsson <gson@gson.org>
To: skrll@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/51151 (athn panic on attach)
Date: Wed, 28 Dec 2016 18:30:49 +0200

 Now that I have a work-around for 51531, I was able to retest the
 Comfast CF-WU871N with -current (source date 2016.12.28.11.44.58),
 and the kernel no longer paniced on insertion.  Also, I could
 successfully ping the adapter over the WLAN.  Thanks for the fix.
 -- 
 Andreas Gustafsson, gson@gson.org

State-Changed-From-To: feedback->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Wed, 28 Dec 2016 16:36:59 +0000
State-Changed-Why:
The bug was fixed.


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.