[folded-merged] mm-swap-use-a-global-swap-cluster-for-non-rotation-devices-fix.patch removed from -mm tree

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

 



The quilt patch titled
     Subject: mm-swap-use-a-global-swap-cluster-for-non-rotation-devices-fix
has been removed from the -mm tree.  Its filename was
     mm-swap-use-a-global-swap-cluster-for-non-rotation-devices-fix.patch

This patch was dropped because it was folded into mm-swap-use-a-global-swap-cluster-for-non-rotation-devices.patch

------------------------------------------------------
From: Kairui Song <ryncsn@xxxxxxxxx>
Subject: mm-swap-use-a-global-swap-cluster-for-non-rotation-devices-fix
Date: Wed, 15 Jan 2025 18:51:57 +0800

check kmalloc() return in setup_clusters

Link: https://lkml.kernel.org/r/CAMgjq7Au+o04ckHyT=iU-wVx9az=t0B-ZiC5E0bDqNrAtNOP-g@xxxxxxxxxxxxxx
Signed-off-by: Kairui Song <ryncsn@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/swapfile.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/mm/swapfile.c~mm-swap-use-a-global-swap-cluster-for-non-rotation-devices-fix
+++ a/mm/swapfile.c
@@ -3217,7 +3217,10 @@ static struct swap_cluster_info *setup_c
 			local_lock_init(&cluster->lock);
 		}
 	} else {
-		si->global_cluster = kmalloc(sizeof(*si->global_cluster), GFP_KERNEL);
+		si->global_cluster = kmalloc(sizeof(*si->global_cluster),
+				     GFP_KERNEL);
+		if (!si->global_cluster)
+			goto err_free;
 		for (i = 0; i < SWAP_NR_ORDERS; i++)
 			si->global_cluster->next[i] = SWAP_ENTRY_INVALID;
 		spin_lock_init(&si->global_cluster_lock);
_

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

mm-swap-use-a-global-swap-cluster-for-non-rotation-devices.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