lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230306024959.131468-1-haifeng.xu@shopee.com>
Date:   Mon,  6 Mar 2023 02:49:59 +0000
From:   Haifeng Xu <haifeng.xu@...pee.com>
To:     akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Haifeng Xu <haifeng.xu@...pee.com>
Subject: [PATCH] mm: remove redundant check in handle_mm_fault

mem_cgroup_oom_synchronize() has checked whether current memcg_in_oom is
set or not, so remove the check in handle_mm_fault().

Signed-off-by: Haifeng Xu <haifeng.xu@...pee.com>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index f456f3b5049c..e066d974c27b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5206,7 +5206,7 @@ vm_fault_t handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
 		 * VM_FAULT_OOM), there is no need to kill anything.
 		 * Just clean up the OOM state peacefully.
 		 */
-		if (task_in_memcg_oom(current) && !(ret & VM_FAULT_OOM))
+		if (!(ret & VM_FAULT_OOM))
 			mem_cgroup_oom_synchronize(false);
 	}
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ