From patchwork Mon Jun 19 13:02:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 777744 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3wrrjj3lC9z9s8V; Mon, 19 Jun 2017 23:02:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b="VSuC1Yme"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1dMwK6-0006Pn-10; Mon, 19 Jun 2017 13:02:30 +0000 Received: from mail-it0-f43.google.com ([209.85.214.43]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dMwJz-0006P7-4j for kernel-team@lists.ubuntu.com; Mon, 19 Jun 2017 13:02:23 +0000 Received: by mail-it0-f43.google.com with SMTP id m62so66142537itc.0 for ; Mon, 19 Jun 2017 06:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=5hm/YXRshh6oa63CXOfw+d6gfWgrN9T3tSK+wyeIMjY=; b=VSuC1YmeuyGnPDXjPiTc3vMuO/gfkZkfgF1A0SDbFmjojBSiZZXfXqzWxFh8DUJ8j/ CYVy1keI2kKh+apPgHFJbvz7wWkjdRzgm4nPhbsW3UXa9lIqxninbGqYRdifpNk/jIiv SKyvgMEHwqx46JU0xsGKiwCON0L78aCTh7zwFGox3bInvjaAS/kW/HM5mv4VMjxn7N6G vh2fRoSD+9jaGAgkkI43tGRUo+mLvRd2LlHdv2EJJt8hkpxj6p9yj3Xx6I1e1OcmBXWT WNYr1SfAJAx0IYQTnLidy4+pAsewK1H+CWqstjKTebzGPRmUidq7gyokNuHwm4Vk2Kj5 AL+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=5hm/YXRshh6oa63CXOfw+d6gfWgrN9T3tSK+wyeIMjY=; b=E/2Rj/thALISWLMT3Z4Se+r/FbujN3YDH4+gFAg4rwnWuHgGF9N3ROhOclVb3kStm9 DDaTvAjztnmLb5c1RFIugZHZofxPTQgFXrEzjYzj85OvIUygq+2Nig1G+wk6V+UfdNDH wHOY4BR8ZLvRP7Ldqz/OmIc4sIhvZU+9W9jkmBdY+rMoQQnwro/O59j4cWOOkwSW1O07 QonaFJty/im+bC8PZs+uKm+J62eX8MuId8Nk6HI6NIPw4CdQyFJyFCgXJWQAD9c3enxi M8K2hS4a2LOJmkclStUKCbNDUtIX1gtpBpPsQ7KRaMAsoG1+hktcwCzSKnip9TbgwA+3 iW4w== X-Gm-Message-State: AKS2vOzlw+SiwqsL6UVeMgeMf+IuXXJ7L0itUE9ktF+wYSljY7Zf3Tel S7gMjC+vTi9cm76tp3U= X-Received: by 10.36.245.129 with SMTP id k123mr8743548ith.1.1497877341185; Mon, 19 Jun 2017 06:02:21 -0700 (PDT) Received: from localhost ([2605:a601:aa7:8920:38f2:ce12:8b0a:e8bf]) by smtp.gmail.com with ESMTPSA id s77sm6492219ita.3.2017.06.19.06.02.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Jun 2017 06:02:19 -0700 (PDT) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][Y/Z SRU] pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes Date: Mon, 19 Jun 2017 08:02:17 -0500 Message-Id: <20170619130217.27308-2-seth.forshee@canonical.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619130217.27308-1-seth.forshee@canonical.com> References: <20170619130217.27308-1-seth.forshee@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: "Eric W. Biederman" BugLink: http://bugs.launchpad.net/bugs/1698264 The code can potentially sleep for an indefinite amount of time in zap_pid_ns_processes triggering the hung task timeout, and increasing the system average. This is undesirable. Sleep with a task state of TASK_INTERRUPTIBLE instead of TASK_UNINTERRUPTIBLE to remove these undesirable side effects. Apparently under heavy load this has been allowing Chrome to trigger the hung time task timeout error and cause ChromeOS to reboot. Reported-by: Vovo Yang Reported-by: Guenter Roeck Tested-by: Guenter Roeck Fixes: 6347e9009104 ("pidns: guarantee that the pidns init will be the last pidns process reaped") Cc: stable@vger.kernel.org Signed-off-by: "Eric W. Biederman" (cherry picked from commit b9a985db98961ae1ba0be169f19df1c567e4ffe0) Signed-off-by: Seth Forshee Acked-by: Colin Ian King Acked-by: Stefan Bader --- kernel/pid_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index a65ba137fd15..567ecc826bc8 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -255,7 +255,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) * if reparented. */ for (;;) { - set_current_state(TASK_UNINTERRUPTIBLE); + set_current_state(TASK_INTERRUPTIBLE); if (pid_ns->nr_hashed == init_pids) break; schedule();