Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1808117imm; Tue, 22 May 2018 09:37:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpfrfjWh+SE2G+oCehI2K+PSbOx1Jl9FBfmb423gRO2/HuFr4EmWjA2uK3pmSEX9w8HExXw X-Received: by 2002:a62:d605:: with SMTP id r5-v6mr25161329pfg.8.1527007078945; Tue, 22 May 2018 09:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527007078; cv=none; d=google.com; s=arc-20160816; b=UjgLp8klCUWRESYzskY9O3/AKwjDmsuWz+bQzJhUOU+nsCXawApkXF28DzhiqJxaHZ OhwnkhWtvAPqEcdk+lytQxxGP5qjDHucrIl4ezrSAPuyzjL6DCbj1Sga3bA0/9dYZUPK aOSvpbNJG7Aatgy4UlmBAyerza7kX9IZzzmTVMo1q3vt+CbP+DrBs+619+Va2mPh+QOy xmn7YiDIs4lGfPxj1PM8eUbctBE2NJcUtL+BZmAtJyhmgFfD9PAs3QhFW7Yt+1dqbC9F nXJa7jgdXx6AUJlaDJMnn5RbmN/LPoyGrk6jZ3m5vDhQ+t+4LP79FpS8ApjfN3WjMHix 9qew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=ddS9TAWzJQdv3XcgqP2BwKAoFe6VuMwHOGADQgGvFRA=; b=B/67c2zCvDJl3po0AgkpFTqmLbv0B+CumuQPiyvslPzK+tLvdqa/7891AaegezY3jo CHNdpLf4lk5LvSxJ/WJWPkdfF9bEEfAnJrfW0R+BQc0GUfUsKn6k03K570B0LybUV1iF EiW4Sa9+wKBFxPCol+6QJtm18fMic2LobRMnUT0I+bmoi1Ik370stuuzZesTqJ3i4BIH +2UZdRnoBWGk/vo2M3RpynsbJVgtdoYK65EjgnSD/K3SFfEo0bN24Z7Bfx+xvSn0jeXi oL0G9KJ1VL0cbQr53sLvu4E6ncWXjtHcBgAXhehntBn9fIeCP8TmvURf5ajXp5M3EexV oivA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q80-v6si16862105pfi.109.2018.05.22.09.37.43; Tue, 22 May 2018 09:37:58 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbeEVQhA (ORCPT + 99 others); Tue, 22 May 2018 12:37:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44060 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751492AbeEVQg5 (ORCPT ); Tue, 22 May 2018 12:36:57 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3DFF4023821; Tue, 22 May 2018 16:36:56 +0000 (UTC) Received: from [10.36.118.115] (unknown [10.36.118.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7992C2166BAD; Tue, 22 May 2018 16:36:55 +0000 (UTC) Subject: Re: [PATCH v2 2/2] kasan: fix memory hotplug during boot To: Andrey Ryabinin , 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: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 22 May 2018 18:36:49 +0200 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 22 May 2018 16:36:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 22 May 2018 16:36:56 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'david@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.05.2018 18:26, Andrey Ryabinin wrote: > > > 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: Think this even dates back to: 786a8959912e ("kasan: disable memory hotplug") > >> 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 >> -- Thanks, David / dhildenb