[-mm patch] add KM_SKB_DATA_SOFTIRQ to kmap_atomic debugging

Frederik Deweerdt
2006-12-29T11:07:08Z

On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
>
Andrew,

The kmap_atomic-debugging patch checks twice for (type !=
KM_SKB_SUNRPC_DATA). The right check would be to look for
KM_SKB_DATA_SOFTIRQ, as added by the following patch. I've read the
mail, in which you mentioned that you spotted a copy-n-paste error in
kmap_atomic, I suppose that you refered to this, but just in case...

Regards,
Frederik

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>

diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
index 1344c98..51e4205 100644
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -46,7 +46,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
if (type != KM_IRQ0 && type != KM_IRQ1 &&
type != KM_SOFTIRQ0 && type != KM_SOFTIRQ1 &&
type != KM_SKB_SUNRPC_DATA &&
- type != KM_SKB_SUNRPC_DATA) {
+ type != KM_SKB_DATA_SOFTIRQ) {
WARN_ON(1);
warn_count--;
}