kern/78179: bus_dmamem_alloc() with BUS_DMA_NOWAIT can block

PeterJeremy at optushome.com.au PeterJeremy at optushome.com.au
Mon Feb 28 07:20:10 GMT 2005


>Number:         78179
>Category:       kern
>Synopsis:       bus_dmamem_alloc() with BUS_DMA_NOWAIT can block
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 28 07:20:09 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 5.3-RELEASE-p5 i386
>Organization:
n/a
>Environment:
System: FreeBSD server.vk2pj.dyndns.org 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #2: Sat Feb 26 15:54:18 EST 2005 root at server.vk2pj.dyndns.org:/home/obj/usr/src/sys/server i386

>Description:

	If a request for more than one page of memory is passed to 
	bus_dmamem_alloc(), contigmalloc() is used to allocate the
	requested memory.  bus_dmamem_alloc() defines a flag
	BUS_DMA_NOWAIT which specifies that bus_dmamem_alloc() is not
	to wait.

	BUS_DMA_NOWAIT is mapped to M_NOWAIT but contigmalloc() does not
	support M_NOWAIT and can block.  This problem appears to exist on
	4.x, 5.x and 6.x.

>How-To-Repeat:
	I originally ran into the problem with USB transfers on FreeBSD
	4.10.  That particular problem was avoided by a patch to reduce
	the memory consumption of USB but the underlying inconsistency
	between bus_dmamem_alloc() and contigmalloc() remains.

	I don't have a specific procedure to reproduce the fault.
>Fix:
	Unknown.


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list