kmap_atomic in 2.6.20.x

From: Raz Ben-Jehuda(caro)
Date: Wed Jun 06 2007 - 13:03:28 EST


Hello

I am running into some problems with kmap_atomic in my driver.
My driver copies some pages coming from
user space to "kernel space kmalloc'ed memory".
I had this code running from 2.6.5 to 2.6.17 without any problems.
I have upgraded to 2.6.20.xx and this code fails to kmap_atomic.
I am running a uni processor 2 GRAM machine, 32bit.

Basically this is code does:

get_user_pages(page,...)

kmap_atomic(page,KM_USER0);
.. copy and stuff
kunmap_atomic(page,KM_USER0)

I have also tried KM_USER1 and KM_SKB_SUNRPC_DATA.
I crash in arch/i386/highmem.c line 42:
...
if (!pte_none(*(kmap_pte-idx)))
BUG();
..

To the best of my understanding ( from "see : understand the linux
kernel" page 310 ) , a different kernel component holds this window. A
fact which is quite strange in the case of KM_SKB_SUNRPC_DATA. I have
nothing that uses it.

1. Why kmap_atomic does not return NULL ?
2. Why am I failing only in high memory mappings ?

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