Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2005 18:17:55 +1100 (EST)
From:      PeterJeremy@optushome.com.au
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        PeterJeremy@optushome.com.au
Subject:   kern/78179: bus_dmamem_alloc() with BUS_DMA_NOWAIT can block
Message-ID:  <200502280717.j1S7HtRR017617@server.vk2pj.dyndns.org>
Resent-Message-ID: <200502280720.j1S7K9pH063583@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502280717.j1S7HtRR017617>