panic in bus_dma_tag_destroy()

Chuck Tuffli chuck_tuffli at agilent.com
Wed Oct 6 16:08:32 PDT 2004


On Wed, Oct 06, 2004 at 04:00:06PM -0700, Matthew Dillon wrote:
> 
> :I'm seeing a panic in bus_dma_tag_destroy() on the free of
> :dmat->segments. In comparing this to FBSD 4.10 and 5.x, the code seems
> :closest to the 5.x branch with the exception that 5.x seems to defer
> :the allocation of segments til bus_dmamap_create() while DFly
> :allocates this in bus_dma_tag_create(). The only other thing I noticed
> :was that DFly allocates segments with M_INTWAIT while FBSD allocates
> :it with M_NOWAIT.
> 
>     Get a backtrace from the DDB prompt.   The 'trace' command. If you
>     aren't getting a DDB prompt then compile up a kernel with 'options DDB'
>     in the kernel config.

ok, I'll need to hook up a console.

>     You didn't mention which driver was faililng, but the backtrace should
>     show that.  

it's a new one I'm working on.

>     In anycase, if I understand your analysis the driver must be calling
>     bus_dma_tag_destroy() with a NULL svd->parent_dmat.  I will analyize
>     the driver and determine whether it is appropriate to have 
>     bus_dma_tag_destroy() check for NULL or whether it is appropriate for
>     the driver to check for NULL and not call bus_dma_tag_destroy().

I'm pretty sure svd->parent_dmat is not NULL after allocation. The
call to bus_dma_tag_create() doesn't return an error in any case.
Commenting out lines 235-236 of src/sys/i386/i386/busdma_machdep.c
makes the panic go away for me.

-- 
Chuck Tuffli    <chuck_tuffli at xxxxxxxxxxx>
Agilent Technologies, Storage Area Networking
(916) 788 5086





More information about the Bugs mailing list