On Wed, Mar 04, 2009 at 12:41:50AM +0100, Christoph Egger wrote: > > Hi, > > When bus_dmamap_create() fails, then the map pointer > is undefined. This is IMO a problem, because the > dma free routines in many drivers assume the map > pointer is NULL when invalid. > This let the drivers call bus_dmamap_destroy() > on an invalid map pointer. > Currently, I fixed two drivers: nfe(4) and age(4). > > I see two ways to fix this: We go through all > drivers and set the map pointer explicitely > to NULL in the error path of bus_dmamap_create() "We" go through all the drivers and fix that and the metric ton of other ways in which they break if anything goes wrong during attach. -- Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost "See the look on my face from staying too long in one place [...] every time the morning breaks I know I'm closer to falling" KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
Description: PGP signature