Re: get_vm_area and GFP_KERNEL

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 27 Oct 1998 23:06:56 +0000 (GMT)


> The routine get_vm_area calls kmalloc passing GFP_KERNEL. Get_vm_area
> is called from vremap (2.0 kernels) and ioremap (2.1 kernels). These
> routines are used to map physical memory (as in PCI device registers) to
> kernel address space.

Yes

> The problem: If these routines are called from a bottom half task queue
> routine then kmalloc thinks that it is being called from interrupt level
> without GFP_ATOMIC and prints a message to that effect.

Its not allowed to do this. ioremap and vremap are not callable from
bh or interrupt state.

The atomicity of the memory allocation is a minor issue to the cross CPU
coherency and deadlock issues.

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