1
0
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:
Justin T. Gibbs 1999-08-16 01:51:38 +00:00
parent 76782487f3
commit 3c0dcb2cf2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49859
2 changed files with 4 additions and 4 deletions

View File

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

View File

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