Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1796504imm; Tue, 22 May 2018 09:26:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr8FeuNr6jXJITkNjYCgEcqiLjZ+odPzOKu2uUEAY+6QrOwKUGNXc4uKY/vMhjVxwpD9dfo X-Received: by 2002:a62:b909:: with SMTP id z9-v6mr24998668pfe.254.1527006385483; Tue, 22 May 2018 09:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527006385; cv=none; d=google.com; s=arc-20160816; b=feGt2IYEUn5j1a4rRxNflgu5tNCuFGgEW+f/at+cdeYFfheGEGAz2NMtbzWiOfSLrA FO2P1XYQBrs359ZHqOSUO8cVrUBu+4hwjEQbFiICIw1HK1Lwt2v30sZwQbZ+oUti11em WUpKpQPgl9/bfPx9zXfNjLb/p/1QBWMg5olhntRPM0Npds6JlbniE7jmxAvhcimNFuiN 4uliaqvQjafI+BCdnSN8yGk5BekmmxzK/d+rjIr3reqhuZXNVmAXoaCggJqa5LWkUljX r5A2Hes4/k8YD7gNDZO8F4xnxWfO7B09nZxkBT495jo44pJ2e0/G7NqMm9ogygZ+mflE jm4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=GNdmmLSwdYGJaugyanVNK7MiCptjLOiAPnasl4Y5K40=; b=i9aNoTNeY8Uav0H3362yhEREv2DBM/JR4ydu5aac+ucfyjHAKV8VfAbljOoD1FFywq q65SnBN9lsdSGnkLvx02vwGVNI4ZUrIbHU3MJS3IcLf+ZoQ322W+G7jdDgrVb73mdSwb YF2/FbnEcayinq+1lW08ioAQmmTG8FX5gmI1Q/js3ctzMr/vFpQgJAdEMg3Y6eJc9GFO uMvnAP/+csNYkTaxKR++2p/1vBk8FjziVMwwm/Ogbwftb4Vbw2FvDW4UY0HTC9rMyl8o N4ZBFLGJBkVEJv+YSq8qWmEmyrfGgtiR9qbAvb2Sgh8w4jBtbHiiw0kmO7JUjbgN0Lsb xe3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Npd9FS3X; 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=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7-v6si13073093pgc.14.2018.05.22.09.26.10; Tue, 22 May 2018 09:26:25 -0700 (PDT) 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=@virtuozzo.com header.s=selector1 header.b=Npd9FS3X; 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=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751672AbeEVQZs (ORCPT + 99 others); Tue, 22 May 2018 12:25:48 -0400 Received: from mail-he1eur01on0127.outbound.protection.outlook.com ([104.47.0.127]:39712 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751613AbeEVQZn (ORCPT ); Tue, 22 May 2018 12:25:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GNdmmLSwdYGJaugyanVNK7MiCptjLOiAPnasl4Y5K40=; b=Npd9FS3XVCEogv7g8kQWRNim76t6iERj2eFFZXZP/Wru0SUIAuUreeeCrBAbgMKcta9U/GIbMkcRBPAv1iRk9G+hhS/eQ1O7cXB0R/CcPzZ5iB6U90qemrOJ5tYqHH83lymUZFlmg6Ty0zWrc4bWhxbA1JyacG+Ai34e5JIBr+0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [172.16.25.12] (195.214.232.6) by AM0PR08MB3252.eurprd08.prod.outlook.com (2603:10a6:208:5e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.16; Tue, 22 May 2018 16:25:38 +0000 Subject: Re: [PATCH v2 2/2] kasan: fix memory hotplug during boot To: David Hildenbrand , linux-mm@kvack.org, Andrew Morton Cc: linux-kernel@vger.kernel.org, Alexander Potapenko , Dmitry Vyukov , "open list:KASAN" References: <20180522100756.18478-1-david@redhat.com> <20180522100756.18478-3-david@redhat.com> From: Andrey Ryabinin Message-ID: Date: Tue, 22 May 2018 19:26:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180522100756.18478-3-david@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0902CA0017.eurprd09.prod.outlook.com (2603:10a6:3:e5::27) To AM0PR08MB3252.eurprd08.prod.outlook.com (2603:10a6:208:5e::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM0PR08MB3252; X-Microsoft-Exchange-Diagnostics: 1;AM0PR08MB3252;3:2rxb0rZNeDmamNhaJdRbHlTOxTAPw3OaWNboEIxmac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G+mTCRpBE52o21mOVgmurs4BAi8CoNEhbrsyU4umbuFTBzFyijuBpV5LR5LCPY9QAk5dS+VZckbEpWjDryDscAER14RsP8xylFKMCgl3djGofvQ+OCuvMKVOuS8vijAnkhwV1tmZXuSkGWjYT2HC1i1ujo86wKYvuiXYIQJnHwfccVzdsdbdmW4ViNkROPoXHARs+C37bu84CcqGAlwdmFGDiqImYEcfXhsS2gYyxeh0l0WL/HRu7ZYe9YVJKNKqiKdgezck9xwta7AsMkLq/7WYZK+qJhdBKE0PPgFpwQkgpqemzI;4:mRho9sNdQLGWY+6qAnxf/4Kv5+YsI0DMyyb1m7EDIuR+BdcnIsSfyfA6JyoLhFlZiqZd3pp/P8eUDksurtZz2iNMJvDWo5i7nqaNpd0CdP8fwEXgY5S7DbZaxTqEl7mQuLzxAjVmsNQhuUmjk4YFsiuK6E7FzYmMFV7Ev52FmMZ+5BuBHlNiw/cWuaO6adoaKgTx+EOzeUzuS4PMKBRK1nj9jbXIIavBXZGzYRbKyFjnR2Mq8oeiw0/2QEMppLY6rYzmaBHrWvKod8S1LDrxbGNxa7wLJ0VXas8OyVQRMeiYPPz329sJA90XfqFOF/eZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:AM0PR08MB3252;BCL:0;PCL:0;RULEID:;SRVR:AM0PR08MB3252; X-Forefront-PRVS: 0680FADD48 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(376002)(39380400002)(346002)(39850400004)(366004)(396003)(199004)(189003)(65806001)(65956001)(66066001)(478600001)(386003)(4326008)(36756003)(53546011)(25786009)(52146003)(2486003)(23676004)(47776003)(59450400001)(76176011)(55236004)(446003)(486006)(52116002)(2616005)(86362001)(305945005)(476003)(956004)(31696002)(7736002)(11346002)(53936002)(8936002)(8676002)(50466002)(81156014)(81166006)(97736004)(68736007)(110136005)(58126008)(6116002)(3846002)(16576012)(54906003)(26005)(106356001)(6486002)(31686004)(5660300001)(77096007)(230700001)(16526019)(2906002)(6666003)(186003)(65826007)(6246003)(64126003)(229853002)(105586002)(316002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM0PR08MB3252;H:[172.16.25.12];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:3; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTBQUjA4TUIzMjUyOzIzOndDVDVzZm5ndnU1bzFZSVpPUVAwOFQwM25H?= =?utf-8?B?aGgxVENzM3pCMkFEV0psV25GY1luZnJVUUlmd1h3M3U0MU5hSXV2UGozYm5W?= =?utf-8?B?SVlKandyVTVDN0dZRG5idkI3bUtoa1E4RGh6bFVUQm1KSHlxSDRJaVFnYm14?= =?utf-8?B?RVY5dkV0bk5xSzgyOW1kTFl5bU1zZDV3cGh5S0duN0pEYjhwSzRWbjU4eGlQ?= =?utf-8?B?WlRnTjlxMExZeVVISUU2NUQzL0g1U3BCUG9vSWZFVlJyaWRvUjl1U3k0dWY4?= =?utf-8?B?UTl6WXdYOE9jQWFJT1JRaGZ5K1FLRWFrKzQ2ZDIwY0hiTmwvUU81WTJRaklj?= =?utf-8?B?MU9CVUxWZjVKSXBnUmFiZWxMSGp5NnNoY0xlVXhET2I4R3lFNEZzZ1l3TVcv?= =?utf-8?B?K0o0YzFiZ1hsdVlzMWF4OXhFdWdOVldWWEw0SlNPcmxPVUJqa3BqeHNWS0hO?= =?utf-8?B?NHZqNjNGQk90cnpXbE5taFJVbllwNzZGd2N4NTlESnY1RlVrZm9ybXN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LyA9pDMBLH0YJagNl35L+Icjucl5Ou8EtQfHPV41treJM7Ljdl33H1OUVAvn3U4hZifO7lM= X-MS-Office365-Filtering-Correlation-Id: 9f7e3c8d-da7d-4f66-19b5-08d5c000a7e2 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2018 16:25:38.6470 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f7e3c8d-da7d-4f66-19b5-08d5c000a7e2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3252 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/2018 01:07 PM, David Hildenbrand wrote: > Using module_init() is wrong. E.g. ACPI adds and onlines memory before > our memory notifier gets registered. > > This makes sure that ACPI memory detected during boot up will not > result in a kernel crash. > > Easily reproducable with QEMU, just specify a DIMM when starting up. reproducible > > Signed-off-by: David Hildenbrand > --- Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug") Acked-by: Andrey Ryabinin Cc: > mm/kasan/kasan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c > index 53564229674b..a8b85706e2d6 100644 > --- a/mm/kasan/kasan.c > +++ b/mm/kasan/kasan.c > @@ -892,5 +892,5 @@ static int __init kasan_memhotplug_init(void) > return 0; > } > > -module_init(kasan_memhotplug_init); > +core_initcall(kasan_memhotplug_init); > #endif >