NetBSD-Bugs archive

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

Re: kern/50810: Kernel page fault trap in ugenclose()



The following reply was made to PR kern/50810; it has been noted by GNATS.

From: Andreas Gustafsson <gson%gson.org@localhost>
To: skrll%NetBSD.org@localhost
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: kern/50810: Kernel page fault trap in ugenclose()
Date: Sat, 20 Feb 2016 22:53:52 +0200

 Nick,
 
 You wrote:
 >  > Also, there are several places checking for sce == NULL, for example:
 >  >
 >  >     sce = &sc->sc_endpoints[UGENENDPOINT(dev)][IN];
 >  >     if (sce == NULL)
 >  >
 >  > None of these make any sense - sce is a pointer into the middle of a
 >  > the ugen_softc struct, so it can *never* be NULL by definition.
 >  > Should they all say "sce->sc == NULL"?  What is the canonical way
 >  > of distinguishing a valid endpoint from an invalid one?
 >  
 >  I guess edesc and/or iface get populated with something after 
 >  ugen_set_interface/ugen_set_config
 
 I'm sorry, but I fail to see the connection between my question and
 your answer.
 -- 
 Andreas Gustafsson, gson%gson.org@localhost
 


Home | Main Index | Thread Index | Old Index