NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/42577: u3g driver does bogus things in the match routine



>Number:         42577
>Category:       kern
>Synopsis:       u3g driver does bogus things in the match routine
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 04 20:20:00 +0000 2010
>Originator:     Martin Husemann
>Release:        NetBSD 5.99.23
>Organization:
The NetBSD Foundation, Inc
>Environment:
System: NetBSD night-owl.duskware.de 5.99.23 NetBSD 5.99.23 (NIGHT-OWL) #21: 
Mon Jan 4 20:41:07 CET 2010 
martin%night-owl.duskware.de@localhost:/usr/src/sys/arch/i386/compile/NIGHT-OWL 
i386
Architecture: i386
Machine: i386
>Description:

The u3g driver tries to reinit some device types (Huawei, Novatel, Sierra)
in it's "match" function. This is bogus and can not work. First, the
match routine should not modify any state. Second the reinit functions
query the config descriptor - which is not valid before the call to
usbd_set_config_index(), i.e. moving the device to configured state.

The config descriptor pointer returned is NULL, and the reinit fails.

>How-To-Repeat:
Run a diagnostic kernel trying to use one of the "reinit" devices.

>Fix:
Match the devices passively via a second match table, then do the
device state dance in the attach function after the config descriptor
is available.



Home | Main Index | Thread Index | Old Index