mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Fix a bug in busdma_mem_free() where we were improperly checking
the map associated with the region to free.
This commit is contained in:
parent
76782487f3
commit
3c0dcb2cf2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49859
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: busdma_machdep.c,v 1.12 1998/12/14 05:35:56 dillon Exp $
|
||||
* $Id: busdma_machdep.c,v 1.13 1999/07/02 05:12:11 mjacob Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -353,7 +353,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
|
||||
* dmamem does not need to be bounced, so the map should be
|
||||
* NULL
|
||||
*/
|
||||
if (map != &nobounce_dmamap)
|
||||
if (map != NULL)
|
||||
panic("bus_dmamem_free: Invalid map freed\n");
|
||||
/* XXX There is no "contigfree" and "free" doesn't work */
|
||||
if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem))
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: busdma_machdep.c,v 1.12 1998/12/14 05:35:56 dillon Exp $
|
||||
* $Id: busdma_machdep.c,v 1.13 1999/07/02 05:12:11 mjacob Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -353,7 +353,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
|
||||
* dmamem does not need to be bounced, so the map should be
|
||||
* NULL
|
||||
*/
|
||||
if (map != &nobounce_dmamap)
|
||||
if (map != NULL)
|
||||
panic("bus_dmamem_free: Invalid map freed\n");
|
||||
/* XXX There is no "contigfree" and "free" doesn't work */
|
||||
if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem))
|
||||
|
Loading…
Reference in New Issue
Block a user