+ mm-z3foldc-remove-z3fold_migration-trylock.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/z3fold.c: remove z3fold_migration trylock
has been added to the -mm tree.  Its filename is
     mm-z3foldc-remove-z3fold_migration-trylock.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-z3foldc-remove-z3fold_migration-trylock.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-z3foldc-remove-z3fold_migration-trylock.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Henry Burns <henryburns@xxxxxxxxxx>
Subject: mm/z3fold.c: remove z3fold_migration trylock

z3fold_page_migrate() will never succeed because it attempts to acquire a
lock that has already been taken by migrate.c in __unmap_and_move().

__unmap_and_move() migrate.c
  trylock_page(oldpage)
  move_to_new_page(oldpage_newpage)
    a_ops->migrate_page(oldpage, newpage)
      z3fold_page_migrate(oldpage, newpage)
        trylock_page(oldpage)

Link: http://lkml.kernel.org/r/20190710213238.91835-1-henryburns@xxxxxxxxxx
Fixes: 1f862989b04a ("mm/z3fold.c: support page migration")
Signed-off-by: Henry Burns <henryburns@xxxxxxxxxx>
Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx>
Cc: Vitaly Wool <vitalywool@xxxxxxxxx>
Cc: Vitaly Vul <vitaly.vul@xxxxxxxx>
Cc: Jonathan Adams <jwadams@xxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Snild Dolkow <snild@xxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/z3fold.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/mm/z3fold.c~mm-z3foldc-remove-z3fold_migration-trylock
+++ a/mm/z3fold.c
@@ -1343,16 +1343,11 @@ static int z3fold_page_migrate(struct ad
 	zhdr = page_address(page);
 	pool = zhdr_to_pool(zhdr);
 
-	if (!trylock_page(page))
-		return -EAGAIN;
-
 	if (!z3fold_page_trylock(zhdr)) {
-		unlock_page(page);
 		return -EAGAIN;
 	}
 	if (zhdr->mapped_count != 0) {
 		z3fold_page_unlock(zhdr);
-		unlock_page(page);
 		return -EBUSY;
 	}
 	new_zhdr = page_address(newpage);
@@ -1384,7 +1379,6 @@ static int z3fold_page_migrate(struct ad
 	queue_work_on(new_zhdr->cpu, pool->compact_wq, &new_zhdr->work);
 
 	page_mapcount_reset(page);
-	unlock_page(page);
 	put_page(page);
 	return 0;
 }
_

Patches currently in -mm which might be from henryburns@xxxxxxxxxx are

mm-z3foldc-lock-z3fold-page-before-__setpagemovable.patch
mm-z3fold-fix-z3fold_buddy_slots-use-after-free.patch
mm-z3foldc-remove-z3fold_migration-trylock.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux