Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1147255pxb; Sun, 19 Sep 2021 07:35:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCdRoCRXHoNqrTCdgwcaKmitLItKAjk0x7jSi9W/v7Nk/7jsXVNunxA0/cTFVgolJRXhiM X-Received: by 2002:a6b:bad5:: with SMTP id k204mr16366347iof.65.1632062117378; Sun, 19 Sep 2021 07:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632062117; cv=none; d=google.com; s=arc-20160816; b=eoeLOC1UfAnPbtW/kJ70r4kvyaWDe7wvyzhIqcKk8ID9CTJFD24PDnrA94TIhaRNvV VbbAi3t61rsE+8ys/eCPW69QhraNWUO64wGPEghEVyseztMHaMhB8R/o32ZXyAPekiox /wPUltl62EnzpHBb1dIf/5mGLuFSk4MI7kP5MizodAK1OH6Gk7H7fLNyckAHaV/Hhfxd voJcADQnigvEP8dE7qayZkGtgqvcA4R8VDMjDNn5LYHeZyqvyxSDUMqGvn9RmQzpwWKs v9E3fvfnSPxJZmOjeMC2qHALnuDRHGt1IFIoGCVzr12AhyZSe9LA2mOX6ZI4NoZIZnXv /FOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:sender:dkim-signature; bh=NyjJPH0yWwRNiBCx2+K7AQlPL3GeoPPTkMMh4PEMJGg=; b=qoSMOtCLPx6C/Bx+UIkpoZHVLxjy0//HUIrvBDZuBHDqy9iNiVFc2yHVvjfyoSpESC LzujITKs519LYTQPkaDb0JaE3LG7fnurrkEjmsBVreDMPJ2Sfs3Be5Q8XKS9yPoPVzkO wAtX30Io8j9E7Lg1AfPgpUctoxbKD1neWROPNH5SYZnBLOhY3JArlubP0W/1kgDoJikD h5z6D9XWTmY3K+VR8R/wCDyLhSo4reyuRshyXTrIKvllFhcoTA6WfUUVuZlwcKk2dlhP X5JiHjybKXMQy433K/68NieTLBJD1F3IDcfpZrA//mj4U90aRqGwqLHBSi+RtSjxNCLI g/DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=oNnwdDV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si10701227iog.43.2021.09.19.07.35.05; Sun, 19 Sep 2021 07:35:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=oNnwdDV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240746AbhIRXlG (ORCPT + 99 others); Sat, 18 Sep 2021 19:41:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240331AbhIRXlF (ORCPT ); Sat, 18 Sep 2021 19:41:05 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A123EC061574 for ; Sat, 18 Sep 2021 16:39:41 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id e7so13529423pgk.2 for ; Sat, 18 Sep 2021 16:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NyjJPH0yWwRNiBCx2+K7AQlPL3GeoPPTkMMh4PEMJGg=; b=oNnwdDV9G1cuZt4+7Pv87ODBrobfZ0zDBsgGmNVG1AO9LojUUIo/S/n7RF4W2Gx59U bOW6rNakaOPogdOpghUbbNJ5I44v8//NpdJPRk1ewQH5E/uKu0s46gQAKoAt59npEp95 IPLJJnLLaILUM9A4F79BPL2YRDgmUDAHHVy3lScJO+Gi+9TiDnlN7dbyOD0UTShLZCeK OZdIpcgXiS2NgDtSLclnu6HnX17y1eG+BtAk8JeCvNWEsuP5PfD20Ks8y4i1qSI+sDnz ubAycn6bjX5H/po7V1awvio29qe3PIs6alCLva4talhgC3cXsJx+Tm7AB5d3L2fzAiB2 vg7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=NyjJPH0yWwRNiBCx2+K7AQlPL3GeoPPTkMMh4PEMJGg=; b=OkPzweHGhhmioiRKCjnV4hRN8CfMEqgWRkKodeMch1sVNWTHowhhSPbsqIjc8edOOQ GB4CeOnF+xgb9MTeeR5wdYjz7tur1W8Echg6wEV/73iJeNl1cG6xZx0iMYQT2d/n4OzQ WFZCJYk3RZjkxQJAljLrVmzN9z6JWSiyBpMvbbkTmgl4sEHzWmIZX+tPerkmMwTW57ju d7RSahI6qU6+uLpNaYUMBiyfFqilb6xbDQzU/uKnnZ+vTHIfSePHXSSNA0cj7+fSNP8J pqIZ9gcOEaiK9SBcfjohtb8vzzS0hdRp7ba4jokgTYQKr7UmnWa9xHWYSrDoObnYlsGm LIQA== X-Gm-Message-State: AOAM5329xc4dqCr5wfqQ5PbZHLvwkUYSgbvs1bJy/9WkK4NVMI4R1O99 ImRKZSIAIlbo49BQfV1ovAY= X-Received: by 2002:a62:1b07:0:b0:438:db92:6db0 with SMTP id b7-20020a621b07000000b00438db926db0mr18269679pfb.29.1632008380989; Sat, 18 Sep 2021 16:39:40 -0700 (PDT) Received: from sultan-box.localdomain ([204.152.215.247]) by smtp.gmail.com with ESMTPSA id i1sm11981696pja.26.2021.09.18.16.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 16:39:40 -0700 (PDT) Sender: Sultan Alsawaf From: Sultan Alsawaf X-Google-Original-From: Sultan Alsawaf Cc: Sultan Alsawaf , Andrew Morton , Michal Hocko , David Rientjes , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: Mark the OOM reaper thread as freezable Date: Sat, 18 Sep 2021 16:39:20 -0700 Message-Id: <20210918233920.9174-1-sultan@kerneltoast.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sultan Alsawaf The OOM reaper thread uses wait_event_freezable() without actually being marked as freezable. Fix it by adding a set_freezable() call. Fixes: aac453635549 ("mm, oom: introduce oom reaper") Signed-off-by: Sultan Alsawaf --- mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 831340e7ad8b..46a742b57735 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -641,6 +641,8 @@ static void oom_reap_task(struct task_struct *tsk) static int oom_reaper(void *unused) { + set_freezable(); + while (true) { struct task_struct *tsk = NULL; -- 2.33.0