Re: bus_dmamem_map fix (test+ok)

2011-06-23 Thread Owain Ainsworth
On Wed, Jun 22, 2011 at 09:32:06PM +0200, Ariane van der Steldt wrote: > On Tue, Jun 21, 2011 at 09:00:49PM +0200, Ariane van der Steldt wrote: > > Bus_dmamem_map has a bug in its error path, where it frees the wrong > > memory in the wrong way. > > After some discussion on icb, the comments and t

Re: bus_dmamem_map fix (test+ok)

2011-06-22 Thread Ariane van der Steldt
On Tue, Jun 21, 2011 at 09:00:49PM +0200, Ariane van der Steldt wrote: > Bus_dmamem_map has a bug in its error path, where it frees the wrong > memory in the wrong way. After some discussion on icb, the comments and the pmap_remove can go too. The pmap_remove is executed by uvm_km_free() at uvm_un

Re: bus_dmamem_map fix (test+ok)

2011-06-21 Thread Kenneth R Westerback
On Tue, Jun 21, 2011 at 09:00:49PM +0200, Ariane van der Steldt wrote: > Hi, > > Bus_dmamem_map has a bug in its error path, where it frees the wrong > memory in the wrong way. Take this code in sparc64 for example: > > va = uvm_km_valloc(kernel_map, size); > ... > > TAIL

bus_dmamem_map fix (test+ok)

2011-06-21 Thread Ariane van der Steldt
Hi, Bus_dmamem_map has a bug in its error path, where it frees the wrong memory in the wrong way. Take this code in sparc64 for example: va = uvm_km_valloc(kernel_map, size); ... TAILQ_FOREACH(m, mlist, pageq) { #ifdef DIAGNOSTIC if (size == 0)