virt_to_page(pci_alloc_consistent())

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Thu Oct 03 2002 - 01:38:14 EST


Guys,

I just noticed that sound drivers use the address from
pci_alloc_consistent() as the input to virt_to_page() all
over the place. I looked into the Documentation/DMA-mapping.txt,
and it says:

  This routine will allocate RAM for that region, so it acts similarly to
  __get_free_pages (but takes size instead of a page order).

I know for fact I got it wrong in sparc in whole 2.4, and it seems
RMK got it wrong in arm. I suggest other architecture maintainers
to look at it ASAP. May even be oopsabe, by indexing outside of
mem_map[] with a suitable sound driver.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:37 EST