Re: Linux-2.6.12

Hugh Dickins
2005-06-20T14:40:38Z

On Mon, 20 Jun 2005, Richard B. Johnson wrote:
> On Mon, 20 Jun 2005, Hugh Dickins wrote:
> >
> > It's the BUG_ON(!pte_none(*pte)) in remap_pte_range. Maybe your page
> > table is corrupt, maybe your driver is trying to remap_pfn_range on
> > top of something already mapped.
>
> But of course it is. There is some memory that is mapped into the
> driver's address space, used for DMA. It was obtained using
> ioremap_nocache(). This memory is then mapped into user-space
> when the user executes mmap(). This is how we DMA directly to
> user-space. Is this no longer allowed?

Of course that is allowed. But mapping it into userspace on top of
an existing populated mapping in userspace is not and has never been
allowed (well, in 2.4.0 it just generated a printk, from 2.4.10
onwards it's been a BUG).

Hugh