Received: by 10.223.176.5 with SMTP id f5csp1023818wra; Fri, 2 Feb 2018 09:53:41 -0800 (PST) X-Google-Smtp-Source: AH8x227sLhuTDpzzszeERxsAbelPjcMTDgCMkh/d+/EB68K9M/1hkpTQvexcKPWTLJ7liW5LKoQn X-Received: by 2002:a17:902:7848:: with SMTP id e8-v6mr20132350pln.386.1517594021245; Fri, 02 Feb 2018 09:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517594021; cv=none; d=google.com; s=arc-20160816; b=Gua6psAQZ2kI3Hwj4bnz3OQcWnB11bMIh4cHVBHPerT5WajGewRqU5UL5n0m0ixHpj jt2o+9V00eF/Yf4osaGji8nKw/hVRKZFyS7U7bKxWW2Lmwee0j2LmL/XDjLOAruBRCxY XDYFYLu+NnFL5zXDJzKzD1B2gxjQWtWemnIbpc5pZkwY3+vP3oe1/dGq/+1zwDwHIsiQ YwuRx7n7jgPtGvZ5uDCkqNdTCbXWChPp3VpcWPsvAA8fxXRSZh8NH4ArM94NoDD6/08T vLtpGvToVw2SDCRZqOqs662ruR0h3hQ9/9vxPM7zGfi9i+Rmli5nOni4ryPOUDLkqlXB RnqA== 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=AVsgAIVzynWi4a+EyI4ZsjL/NyicpZBn29EMNqZXa1I=; b=LiIpH4WZJqrGlScB/gQ8k4jJGBtShplWhzskMjfpnLvy9V6svq2WMKXXqO5ArKz5Zq SBzZYLlaPB1Cw9jIH+gQKiAZUVwPfjd4hlZGlRsItvlvCqrNEg+I1NFALr/JrBs99l45 HEzYThKyy4rU9OmjGiVX3ZxfiEHKcay5rOk15/0XTFF2hLVub4MO2fUg8molPjLU1cBO fCrYTx5sC2CSTXCP8c9gPA6JH5/KboX1weZU5eHOvhdcOBOIEZ9fBQ/Z3LPlIHRXi1V2 Trn1XAkxS+NKzTJ/k1x76puxUnFRF6avI5f99RHSepEVNBMrBwJVdt74Lf39mf8oC2/v U3rg== 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 g189si257458pfc.386.2018.02.02.09.53.26; Fri, 02 Feb 2018 09:53:41 -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 S1753455AbeBBRwf (ORCPT + 99 others); Fri, 2 Feb 2018 12:52:35 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39032 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbeBBRMb (ORCPT ); Fri, 2 Feb 2018 12:12:31 -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 55664F27; Fri, 2 Feb 2018 17:12:30 +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.14 101/156] quota: Check for register_shrinker() failure. Date: Fri, 2 Feb 2018 17:58:02 +0100 Message-Id: <20180202140844.777208902@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@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.14-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 @@ -2985,7 +2985,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; }