Received: by 10.223.176.46 with SMTP id f43csp276435wra; Tue, 23 Jan 2018 20:52:23 -0800 (PST) X-Google-Smtp-Source: AH8x226Mr+uIW7ljNdwLIlVb9x3niuvucffZhwZnFC1i29HHVAlhGELlUTDfP0rDHNVhNrFk9D0p X-Received: by 2002:a17:902:a610:: with SMTP id u16-v6mr6987093plq.401.1516769543725; Tue, 23 Jan 2018 20:52:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516769543; cv=none; d=google.com; s=arc-20160816; b=XdcfLq1L0BTPsItQYHv6moitbnFkrDxTuceQQT1865tNivoJJDBr039oRkpgjBldkE AYsfcG/urlxX9KG25PEzmdBSI1fJks9cSuwkP+v9tpAJjoBEAQQINrQvfq34HtS5MQoC xYli1tWoLGDvj5iwEwkHt8tm/cXOItQofvmsi16hPEqj1xlSTNVW3CPI5B61iOkOmfo6 unIkfgyQl5NCILXFD1hOPoh1F4laEK4n14P2j6ojy7JXlhPn/ytLke2Ao12WMa8P/BeJ DEGLjtKvQG6voqBzxJLtWQVlL2VvMvxQtSya16I1QdJHff/yOD9Zmep3ar36mdYrpjNH 6o0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=t95uHLaA02zZKD7IPQzeWqPcxH0gq4EHeX3HePUOy7s=; b=kacX2mwdJOdxO9vfGbTS5CJXty4QtZv0T+Yz8ktv9qbx4pvm2D2ulu3o6eZWqmWhOk oXDmy6PQNKm8JtEHKTMHZbxHhNTIjGZcrSeLJTiRnT230p3HIqn0e19w43kBgb91m2Qv zXIroP0t6Kvs1F98WNRVGAXBut0oI6QFnZkiQVBR0Mcx2WaZvssAYRAuxFD1x6VbXE81 6G9zV7LfvezljgJDXQYkRc/hFiE9W9vhc8axfT0kkez1qV40ZMKc80ntahLWasX9BO2n 7S4nXbo2aAcnpNc/5ptefK1DLgjDVIL/8fLTohYcb7z/MG6YZdVmIe5rOKkCtM3cDGc5 hVtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WKUS1aa0; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11-v6si5579901pli.152.2018.01.23.20.52.08; Tue, 23 Jan 2018 20:52:23 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WKUS1aa0; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932613AbeAXEvP (ORCPT + 99 others); Tue, 23 Jan 2018 23:51:15 -0500 Received: from mail-by2nam03on0117.outbound.protection.outlook.com ([104.47.42.117]:41259 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932469AbeAXEQE (ORCPT ); Tue, 23 Jan 2018 23:16:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=t95uHLaA02zZKD7IPQzeWqPcxH0gq4EHeX3HePUOy7s=; b=WKUS1aa0JYzZm4Bvq2DMLXebYoRtPsxA7SPbRt/3hyW0rf35QCpZTWqiZVSgjFq3W78ZmVUfj++zbST3m3Ki7T3sjnzQyvSdZ2MxSeLw3VYMq45s+7aE/nrY7QdA3oRChMgqyBSuWssYOYx47EtZdYCQt6mxZJ0IrKV955zr45Y= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1078.namprd21.prod.outlook.com (52.132.130.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.464.1; Wed, 24 Jan 2018 04:15:58 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0464.000; Wed, 24 Jan 2018 04:15:58 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Tetsuo Handa , Jan Kara , Michal Hocko , Jan Kara , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 074/100] quota: Check for register_shrinker() failure. Thread-Topic: [PATCH AUTOSEL for 4.14 074/100] quota: Check for register_shrinker() failure. Thread-Index: AQHTlMnorEaRBPx7K02QC2m7fL9s8g== Date: Wed, 24 Jan 2018 04:15:03 +0000 Message-ID: <20180124041414.32065-74-alexander.levin@microsoft.com> References: <20180124041414.32065-1-alexander.levin@microsoft.com> In-Reply-To: <20180124041414.32065-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1078;6:mmlfZq7JhZUi7zDXD81JymB5Eih6+72Jo4wZHSjNDamtwTWjxUvTEnDyjwpmwTC4r/QOWPzMfmgviyFZCcryakc8DSzPRBQ65SiAlNKO2YLfLklJruiR7ZOPTXV0dEAHRszSCI1F0ucgPLDPE9YqznJsNIQdB6Le6DvQHjrliY3MywrHRU0joqNqQho6pRWKrXyaTP2u8/LtiMGCKBLeJ8WOwkj+t82RDzUH7p5bYQ5RGKcW4NhdDXTIjxZl7wj9OLUGBAJ3/4RDNxHBbZQKCPooD/89AT3a/ka0d9Put9I91CYkw3ZLwAC2yJPTFKk0t/C8vgDTb3iXzo9mIS68aKaqjOirs6vr+ktKV53pGxFNy17qfFVyVDyZ2LusmOx1;5:HGDit5S7MU6G0JkB7jwjra+OGrvmGzyBX1zI539MouAETH+Q9oOZcZoaYUr7p5tdT/5U2OT+yK5e2AAjXwz54AxD6zFDWv+iLa2kQuZFIm5+r9YOGzApLXgVoA9191bx/rmjifAueoNgB32c2Jp9VsjSnMkUvS8xRzRyYlMiNLU=;24:5vQvOtpSn3b+x2YDeTNQk9YVf6iH0B9IpLtbl7mBw5FnOh7mrxpfs0x5UwIeH8hLF94JL4SxS237h+fRpCj/B8Go9AS/gfSFWRReKsh6bZY=;7:79HnKQPTEzqZBIQQLz4uB+dXUpudAyKeAoO+vC6DpB1bqTplU+ze8B/jMDRIMv+1WSL5hbE5ViLtCVltymoRYddoiXBSql0IVJ5b29vpJpS6jUxfkUKxXWpF6zrtXSwYB2+d2TxyyD3LcxUiUdNn2RBUn0HRKbPY+dom46ZAtNLyYk1RQIBzfg6ZGOX0htwIDERgU8UfeI4y4Vx9cEbaEyREa7AsKg/19lX1G+T4AbIzsupouixYheJDBrlhEFH5 x-ms-office365-filtering-correlation-id: ca41e71f-c6f8-4069-4004-08d562e12be6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7193020);SRVR:DM5PR2101MB1078; x-ms-traffictypediagnostic: DM5PR2101MB1078: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(274141268393343)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231046)(2400081)(944501161)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1078;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1078; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(39860400002)(366004)(396003)(39380400002)(199004)(189003)(86612001)(22452003)(6436002)(106356001)(107886003)(102836004)(105586002)(305945005)(5250100002)(2501003)(14454004)(3280700002)(4326008)(7736002)(97736004)(59450400001)(6512007)(36756003)(8936002)(2950100002)(3846002)(6116002)(6506007)(86362001)(54906003)(76176011)(110136005)(2906002)(6666003)(15650500001)(53936002)(66066001)(72206003)(6346003)(5660300001)(8676002)(478600001)(10290500003)(68736007)(81156014)(10090500001)(1076002)(3660700001)(25786009)(316002)(2900100001)(99286004)(575784001)(26005)(6486002)(81166006)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1078;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: e5MKpD+O5r4OH4+P1hf1JCM1ybJq1AAJzmn6Lnt3PAXcle9nWSvHbDmUSoaydDPJlsiOq9Kos5DMH/fug2s4yg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca41e71f-c6f8-4069-4004-08d562e12be6 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 04:15:03.1032 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1078 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/quota/dquot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 8406be97a518..4cd0c2336624 100644 --- 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)); =20 - register_shrinker(&dqcache_shrinker); + if (register_shrinker(&dqcache_shrinker)) + panic("Cannot register dquot shrinker"); =20 return 0; } --=20 2.11.0