From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id iA3Jbm8m565790 for ; Wed, 3 Nov 2004 14:37:58 -0500 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id iA3JbcaS118384 for ; Wed, 3 Nov 2004 12:37:39 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id iA3Jbb3U014133 for ; Wed, 3 Nov 2004 12:37:37 -0700 Message-ID: <4189336C.6030903@us.ibm.com> Date: Wed, 03 Nov 2004 11:37:16 -0800 From: Dave Hansen MIME-Version: 1.0 Subject: Re: fix iounmap and a pageattr memleak (x86 and x86-64) References: <4187FA6D.3070604@us.ibm.com> <20041102220720.GV3571@dualathlon.random> <41880E0A.3000805@us.ibm.com> <4188118A.5050300@us.ibm.com> <20041103013511.GC3571@dualathlon.random> <418837D1.402@us.ibm.com> <20041103022606.GI3571@dualathlon.random> <418846E9.1060906@us.ibm.com> <20041103030558.GK3571@dualathlon.random> In-Reply-To: <20041103030558.GK3571@dualathlon.random> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Andrea Arcangeli Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andi Kleen , Andrew Morton List-ID: Andrea Arcangeli wrote: >>I'll see what I can do to get some backtraces of the __pg_prot(0) && >>page->mapped cases. These appear to be the 2 most common paths: cache_init_objs() and kfree(). But, the path that I'm hitting now appears to be that something got page_count(kpte_page) to -1 (*NOT* page->_count), and then the BUG_ON() trips after a get_page() is done on it. I'm tracking this down now. kpte: c0011000 address: c1a00000 kpte_page: c1000264 split: ffffffff pgprot_val(prot): 00000000 pgprot_val(PAGE_KERNEL): 00000163 (pte_val(*kpte) & _PAGE_PSE): 00000000 path: 1 Badness in __change_page_attr at arch/i386/mm/pageattr.c:156 [] __change_page_attr+0x443/0x5a4 [] kernel_map_pages+0x31/0x80 [] change_page_attr+0x36/0x54 [] kernel_map_pages+0x4b/0x80 [] cache_init_objs+0x194/0x1d8 [] cache_grow+0xe8/0x154 [] cache_alloc_refill+0x226/0x274 [] __kmalloc+0x8b/0xbc [] proc_create+0x76/0xcc [] create_proc_entry+0x6b/0xb4 [] register_proc_table+0xcb/0x110 [] register_proc_table+0xf7/0x110 [] sysctl_init+0x10/0x1c [] do_basic_setup+0x14/0x20 [] init+0xa8/0x15c [] init+0x0/0x15c [] kernel_thread_helper+0x5/0xc kpte: c0006978 address: c052f000 kpte_page: c10000d8 split: ffffffff pgprot_val(prot): 00000000 pgprot_val(PAGE_KERNEL): 00000163 (pte_val(*kpte) & _PAGE_PSE): 00000000 path: 1 Badness in __change_page_attr at arch/i386/mm/pageattr.c:156 [] __change_page_attr+0x443/0x5a4 [] scsi_run_queue+0xaf/0xb8 [] change_page_attr+0x36/0x54 [] kernel_map_pages+0x4b/0x80 [] cache_free_debugcheck+0x2a6/0x2c0 [] scsi_probe_and_add_lun+0x135/0x188 [] kfree+0x9f/0xdc [] scsi_probe_and_add_lun+0x135/0x188 [] scsi_probe_and_add_lun+0x135/0x188 [] scsi_scan_target+0x63/0xbc [] scsi_scan_channel+0x40/0x68 [] scsi_scan_host_selected+0x76/0xb0 [] scsi_scan_host+0x12/0x18 [] ahc_linux_register_host+0x283/0x290 [] sysfs_create_file+0x41/0x48 [] pci_create_newid_file+0x1a/0x24 [] pci_populate_driver_dir+0xa/0x10 [] pci_register_driver+0x76/0x88 [] ahc_linux_detect+0x3b/0x60 [] ahc_linux_init+0xa/0x30 [] do_initcalls+0x66/0xbc [] do_basic_setup+0x1e/0x20 [] init+0xa8/0x15c [] init+0x0/0x15c [] kernel_thread_helper+0x5/0xc -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: aart@kvack.org