On Wed, 18 Jun 2008 10:13:49 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:This is obviously buggy....sorry..quilt refresh miss.. == In speculative page cache lookup protocol, page_count(page) is set to 0 while radix-tree modification is going on, truncation, migration, etc... While page migration, a page fault to page under migration should wait unlock_page() and migration_entry_wait() waits for the page from its pte entry. It does get_page() -> wait_on_page_locked() -> put_page() now. In page migration, page_freeze_refs() -> page_unfreeze_refs() is called. Here, page_unfreeze_refs() expects page_count(page) == 0 and panics if page_count(page) != 0. To avoid this, we shouldn't touch page_count() if it is zero. This patch uses page_cache_get_speculative() to avoid the panic. From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> --- mm/migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: test-2.6.26-rc5-mm3/mm/migrate.c =================================================================== --- test-2.6.26-rc5-mm3.orig/mm/migrate.c +++ test-2.6.26-rc5-mm3/mm/migrate.c @@ -243,7 +243,8 @@ void migration_entry_wait(struct mm_stru page = migration_entry_to_page(entry); - get_page(page); + if (!page_cache_get_speculative(page)) + goto out; pte_unmap_unlock(ptep, ptl); wait_on_page_locked(page); put_page(page); --
| Avi Kivity | [PATCH 09/58] KVM: MMU: Respect nonpae pagetable quadrant when zapping ptes |
| Andrew Morton | 2.6.25-rc2-mm1 |
| James Morris | Re: LSM conversion to static interface |
| Eric W. Biederman | Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu |
git: | |
| David Miller | Re: 2.6.25-rc8: FTP transfer errors |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [GIT *] Solos PCI ADSL card update |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
