From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <486DBF66.6020701@cn.fujitsu.com> Date: Fri, 04 Jul 2008 14:12:54 +0800 From: Li Zefan MIME-Version: 1.0 Subject: Re: [-mm] BUG: sleeping function called from invalid context at include/linux/pagemap.h:290 References: <486C9FBD.9000800@cn.fujitsu.com> <20080704091349.BAA2.KOSAKI.MOTOHIRO@jp.fujitsu.com> In-Reply-To: <20080704091349.BAA2.KOSAKI.MOTOHIRO@jp.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: KOSAKI Motohiro Cc: Hugh Dickins , Andrew Morton , LKML , "linux-mm@kvack.org" , npiggin@suse.de, Lee Schermerhorn , Rik Van Riel List-ID: > Li-san, Could you try to below patch on your environment? > I've tested it, so UNEVICTABLE_LRU is disabled and the bug disapeared. > > ---------------------- > pagewalk use pte_offset_map(). > pte_offset_map() use kmap_atomic(). > __munlock_pte_handler() use lock_page(). > > So, in CONFIG_HIGHPTE=y, following error happend. > > > BUG: sleeping function called from invalid context at include/linux/pagemap.h:290 > in_atomic():1, irqs_disabled():0 > no locks held by gpg-agent/2134. > Pid: 2134, comm: gpg-agent Not tainted 2.6.26-rc8-mm1 #11 > [] __might_sleep+0xbe/0xc5 > [] __munlock_pte_handler+0x3c/0x9e > [] walk_page_range+0x15b/0x1b4 > [] __munlock_vma_pages_range+0x4e/0x5b > [] ? __munlock_pmd_handler+0x0/0x10 > [] ? __munlock_pte_handler+0x0/0x9e > [] munlock_vma_pages_range+0xf/0x11 > [] exit_mmap+0x32/0xf2 > [] ? exit_mm+0xc7/0xda > [] mmput+0x3a/0x8b > [] exit_mm+0xd5/0xda > [] do_exit+0x1fb/0x5d5 > [] ? audit_syscall_exit+0x2aa/0x2c5 > [] do_group_exit+0x5f/0x88 > [] sys_exit_group+0xf/0x11 > [] syscall_call+0x7/0xb > > then, this feature should be disabled on 32BIT until fixed above problem. > > Signed-off-by: KOSAKI Motohiro > > --- > mm/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > Index: b/mm/Kconfig > =================================================================== > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -216,6 +216,7 @@ config PAGE_WALKER > config UNEVICTABLE_LRU > bool "Add LRU list to track non-evictable pages" > default y > + depends on 64BIT > select PAGE_WALKER > help > Keeps unevictable pages off of the active and inactive pageout > -- 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: email@kvack.org