[folded-merged] mm-zswap-fix-potential-memory-corruption-on-duplicate-store-v2.patch removed from -mm tree

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

 



The quilt patch titled
     Subject: mm-zswap-fix-potential-memory-corruption-on-duplicate-store-v2
has been removed from the -mm tree.  Its filename was
     mm-zswap-fix-potential-memory-corruption-on-duplicate-store-v2.patch

This patch was dropped because it was folded into mm-zswap-fix-potential-memory-corruption-on-duplicate-store.patch

------------------------------------------------------
From: Domenico Cerasuolo <cerasuolodomenico@xxxxxxxxx>
Subject: mm-zswap-fix-potential-memory-corruption-on-duplicate-store-v2
Date: Mon, 25 Sep 2023 15:00:02 +0200

add a warning and a comment to the second duplicates check in
zswap_store() (Johannes).

Link: https://lkml.kernel.org/r/20230925130002.1929369-1-cerasuolodomenico@xxxxxxxxx
Fixes: 42c06a0e8ebe ("mm: kill frontswap")
Signed-off-by: Domenico Cerasuolo <cerasuolodomenico@xxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Nhat Pham <nphamcs@xxxxxxxxx>
Cc: Dan Streetman <ddstreet@xxxxxxxx>
Cc: Domenico Cerasuolo <cerasuolodomenico@xxxxxxxxx>
Cc: Seth Jennings <sjenning@xxxxxxxxxx>
Cc: Vitaly Wool <vitaly.wool@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/zswap.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/mm/zswap.c~mm-zswap-fix-potential-memory-corruption-on-duplicate-store-v2
+++ a/mm/zswap.c
@@ -1346,7 +1346,14 @@ insert_entry:
 
 	/* map */
 	spin_lock(&tree->lock);
+	/*
+	 * A duplicate entry should have been removed at the beginning of this
+	 * function. Since the swap entry should be pinned, if a duplicate is
+	 * found again here it means that something went wrong in the swap
+	 * cache.
+	 */
 	while (zswap_rb_insert(&tree->rbroot, entry, &dupentry) == -EEXIST) {
+		WARN_ON(1);
 		zswap_duplicate_entry++;
 		zswap_invalidate_entry(tree, dupentry);
 	}
_

Patches currently in -mm which might be from cerasuolodomenico@xxxxxxxxx are

mm-zswap-fix-potential-memory-corruption-on-duplicate-store.patch
zswap-make-shrinking-memcg-aware.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