Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2153313rwj; Sun, 18 Dec 2022 23:53:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWPPBriKGP6tDzwS72STzHpN11mHJuPO5M515XwSobjyWPTq++/slv0ko2N5dBgYTpS8O3 X-Received: by 2002:a17:907:7e85:b0:801:d6f2:754 with SMTP id qb5-20020a1709077e8500b00801d6f20754mr8325380ejc.52.1671436389216; Sun, 18 Dec 2022 23:53:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671436389; cv=none; d=google.com; s=arc-20160816; b=WvYHqUrPXEDLUmkcjLTVNuQt/RxUkk2YcKJhGwP+duNNKGxaQIZWxtJqnjOshdzG/o ipIsxbx+9ipimMA5qRYD6GLV0ePgyK0uAkt06IODU50e1dVDq476NoH7rvS7eoTK+rm3 7bhd43ywIMYHQI88CkFSco+0dL7u4HXn870CUB+l39uYLAU8vQ4JRnEeOUwA5mJ7CyB3 Lyhx/CLDLicQ3plecYdmQUM+8N3ejHqmCbs2+UKFFmFYi7fatUaGR50mSlNZKGQjeisi DsGGWarjsVYqHa3x+1IW+uXcVBqp6p+h0TWg9ztJo+D86pZNe7YHc8MhFjWNLwj2PWvq IH+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BdWW4mbATFocYlfd/RqNiXq7z60CEKDBIQVxKlktu5Q=; b=paGFa2ONUv2ZHfMb/vI2FshNzJbXynEFlgmP4pvheIbzmc0JdJ0+PhX1zVR++SARKl KkCMPdJ6B6gBDTcY45XeOa44HzOQuWz7doP7x1lLJnoSvX3H2PE7BNQ8R9vrkN8+rOtx IblPb0W9MxBgWbd0wASZcoS+b452i66cEpQP3Jog3Q5GSjmZFxIx4HJgcVyK/uG4ZazS kPPIGFw7yTnfQqBloWa29hQrbwzr9IxupnhOczk1hiOfcdiwNm4CDRf5R59aaDxkDI2H 0yR1PnKmZNtF1oKectmX2T10IemoRDE8+NDGd8wXrs6mojhoWIea1J/L6UdDmYSlf5kz TcEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iVOS83LC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xe9-20020a170907318900b007ae2b7df929si9023619ejb.72.2022.12.18.23.52.52; Sun, 18 Dec 2022 23:53:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iVOS83LC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231491AbiLSHRV (ORCPT + 70 others); Mon, 19 Dec 2022 02:17:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231519AbiLSHRP (ORCPT ); Mon, 19 Dec 2022 02:17:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D7A395A9 for ; Sun, 18 Dec 2022 23:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671434187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BdWW4mbATFocYlfd/RqNiXq7z60CEKDBIQVxKlktu5Q=; b=iVOS83LCEfVnXIMmcMJlJsE+543CDtN0a3MQDAbNpHtCGtsndwMkEhUSC/8n/3msM3MfQo pO7RJZJzYYHFdVcGt0BXX/6tUMRMhqKmotvjMV1mW9cNFbMMC/v5+vD0k6Gdq72DnWpMxH XLhrk17nsFGCm1Ug3DcNg9gT1NTH7wk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-141-FyoKMx-XPI-HEcyT7J2yAQ-1; Mon, 19 Dec 2022 02:16:22 -0500 X-MC-Unique: FyoKMx-XPI-HEcyT7J2yAQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B11A2A59557; Mon, 19 Dec 2022 07:16:22 +0000 (UTC) Received: from localhost (ovpn-12-41.pek2.redhat.com [10.72.12.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 017562026D4B; Mon, 19 Dec 2022 07:16:20 +0000 (UTC) Date: Mon, 19 Dec 2022 15:16:17 +0800 From: Baoquan He To: Lorenzo Stoakes Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, urezki@gmail.com, stephen.s.brennan@oracle.com, willy@infradead.org, akpm@linux-foundation.org, hch@infradead.org Subject: Re: [PATCH v2 5/7] mm/vmalloc: skip the uninitilized vmalloc areas Message-ID: References: <20221217015435.73889-1-bhe@redhat.com> <20221217015435.73889-6-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/17/22 at 12:07pm, Lorenzo Stoakes wrote: > On Sat, Dec 17, 2022 at 09:54:33AM +0800, Baoquan He wrote: > > @@ -3617,6 +3617,11 @@ long vread(char *buf, char *addr, unsigned long count) > > if (!vm && !flags) > > continue; > > > > + if (vm->flags & VM_UNINITIALIZED) > > + continue; > > This comes immediately after asserting that vm _might be null_. This surely must become:- > > if (vm && vm->flags & VM_UNINITIALIZED) > continue; You are right, will fix it in v3. Thanks for careful reivewing.