Received: by 10.223.176.5 with SMTP id f5csp1053644wra; Fri, 2 Feb 2018 10:21:41 -0800 (PST) X-Google-Smtp-Source: AH8x225P5zJnZApDjRzI3A7Ni3MHYoAk5wFdToZUeTr/7CG6wLHgv5UcVtBoiM7JRgHCQX7gB0UE X-Received: by 10.99.95.12 with SMTP id t12mr2001273pgb.291.1517595700979; Fri, 02 Feb 2018 10:21:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517595700; cv=none; d=google.com; s=arc-20160816; b=FD4+q1i46bN0UBrZ0jMCQjBqcxjzIllXKSfTaEjBIYBr7hKAhWQacdHWzwAMYYDd3A dFHDkPMSHygw7oibf9MujyhI/OKj2AkGGjtX0qXSmPpLaBM6sYRQDbpU5j8RBgOQx1ES hgn9fxNyhAE9hdTUa0eV57czRRYRfUoYYDd+TaIvVsWbuEv4zmg6yUog3raB+4AM/U06 J1yhJAWaivd+xX9UNXlTM1X5vjEcud22skotI/onqgkwRiflnbouQ1l40JHRESsIcNF+ CXyhfQSGFqh4JbK3JcDUozo60eBWoem21ki3vQzqiFRZuH+235YaJZF9TgZ805FJfw/S TwkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ctuDBGJFdUSplFo0IWwrswZMVfeHpENGeXRctpCAN9U=; b=gFQzbIK4B30wB45Mi+gtknfgUsPTMjYnQvD+YalXPkT4/oIHBxtPGkSyCgJHtSCMwA q+jHZ//4zaqXswqLLNeWIMLLdWGiAPUMxoumcxT+bAb6P5qlJqiH1Vr/s0RX3Phc0zjc 6RqRbNdSCa9zLb08M6KnSXLurMC1uXkzd34zA6zufRSLhnAiDdnPcIm70oSWwgbDN9tv xX+z6voqBskjb7kXRQJa9noJCqVbx+ib6MYzyrfL8oSaHw6acrHMkL+10rzZqiCoRpZ0 ZNLoIzp+Fokw96pzP6wUOkhXvb/lkmskWTE7qepxN3wk6HkAJa2nxI6FzgRBmo/6wJjW /DMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 94-v6si2293543ple.298.2018.02.02.10.21.26; Fri, 02 Feb 2018 10:21:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752835AbeBBRDu (ORCPT + 99 others); Fri, 2 Feb 2018 12:03:50 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35082 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbeBBRBV (ORCPT ); Fri, 2 Feb 2018 12:01:21 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6DFA9DF6; Fri, 2 Feb 2018 17:01:20 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tetsuo Handa , Jan Kara , Michal Hocko , Jan Kara , Sasha Levin Subject: [PATCH 4.4 45/67] quota: Check for register_shrinker() failure. Date: Fri, 2 Feb 2018 17:58:14 +0100 Message-Id: <20180202140820.392100764@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140815.091718203@linuxfoundation.org> References: <20180202140815.091718203@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tetsuo Handa [ Upstream commit 88bc0ede8d35edc969350852894dc864a2dc1859 ] register_shrinker() might return -ENOMEM error since Linux 3.12. Call panic() as with other failure checks in this function if register_shrinker() failed. Fixes: 1d3d4437eae1 ("vmscan: per-node deferred work") Signed-off-by: Tetsuo Handa Cc: Jan Kara Cc: Michal Hocko Reviewed-by: Michal Hocko Signed-off-by: Jan Kara Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/quota/dquot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2919,7 +2919,8 @@ static int __init dquot_init(void) pr_info("VFS: Dquot-cache hash table entries: %ld (order %ld," " %ld bytes)\n", nr_hash, order, (PAGE_SIZE << order)); - register_shrinker(&dqcache_shrinker); + if (register_shrinker(&dqcache_shrinker)) + panic("Cannot register dquot shrinker"); return 0; }