Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp80793rwj; Sat, 17 Dec 2022 04:39:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXv9EvqMQbia1Vu7lB0BJ5wCWbCcHCPlQXFBTMdgvHIWx607mL173i4fLIE2sDigli1EZOBG X-Received: by 2002:a17:906:c08d:b0:7e2:d47f:d827 with SMTP id f13-20020a170906c08d00b007e2d47fd827mr5390219ejz.41.1671280769436; Sat, 17 Dec 2022 04:39:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671280769; cv=none; d=google.com; s=arc-20160816; b=nvWidUQhw6sdfLFZyKDFy2FWVzc3bCkuPsmwYvfTDSV555Hu2Q+2UXluO6JJCPcS79 VsHo2I5UCjb7jBLCN7nF9hNCwuVlwm8MJILSgHWlPPXOvsbEpynultmoqMl/wxLwAVd1 wHU6tZgFVUPbH9Mg+Ch8b7PrhUH1g+AvtTQsM1d9AZ8T239cz6Auk2NPzKMcdYv0JzTy XZqb8NhhPQepTDbBzjO9Ry8jn2XsGxC4NvXwuQ852rBXCj+kQE8iaIap9+TJLZG/x8GA hbEohmzRRni0/ZfxduUlX1e9VSOaJCUEC2XumIih4+0KJwljiVixS4IH7QaH45Ddt4S+ 8Ytw== 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=HpNFXXFL69ndIoEgbS5lBM2ElXTRVqEor6edUWSntXM=; b=rmI2ncpNSakhklA6PWkj1dBvBQByYC77XzAT6Mmbl+x5ylOcz6zw/IFYX2V3DFHghq a4qu6+QWel578g7k9WKMJmcAQ8bv2kY5jFYwuEJIDPzN0t5TmfhC4vWufslBpgw4g/lq psoj/gopevzKyzxIfoD2w4ScwNAzZSJCi289ZmCXGkfbEPj1tlht6ap073SdJcgWs0cq AIFNJkja0l/Cy5aO4A06mysx8QLsF/NBpREb0e0ZRt6z6d8INthz9aMh5uVWH7DlpYxf 5YrPnR/ykVJJDZWlcTo3y9sdNGvfdZJBYFLlJv2OnElUXiimL2ihp+1J5/oGNkSKEEZI /yTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y8TtUr4w; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd18-20020a1709076e1200b0078d83fb6672si5398060ejc.118.2022.12.17.04.39.10; Sat, 17 Dec 2022 04:39:29 -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=@gmail.com header.s=20210112 header.b=Y8TtUr4w; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbiLQMHd (ORCPT + 70 others); Sat, 17 Dec 2022 07:07:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbiLQMHa (ORCPT ); Sat, 17 Dec 2022 07:07:30 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6F163881 for ; Sat, 17 Dec 2022 04:07:29 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id h10so4805441wrx.3 for ; Sat, 17 Dec 2022 04:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HpNFXXFL69ndIoEgbS5lBM2ElXTRVqEor6edUWSntXM=; b=Y8TtUr4wFHKXkFj0immup8NKR0AwYJjBJ3BFuOxTrBlT+aVsVPaUa3nqnYVAmlklcz MGQV9UuzDByAGD670+r+Szf2jGPvGt9KJbJM9wSkrXRHfKhvK/kwr3IaJs9OukAZnbLg wlzqxDY2m9EkSZqVNrLNWQHSHxYnbsMATxWzvnpmoLfjq4h82xmkrNCRPfGidecNAYwO yzsJKFG63ZeSplFhgtyAWJiHWb9eQO6INsTQPbqu/xVSQj163/sWtxa0EP7MnL1+eMS2 dMkEKbnGadk9C7/PcnXur3L8TOfyF5xtg1EpdhAQxKKe8iva8KSvg0kShEI1YnrR9Elb keeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HpNFXXFL69ndIoEgbS5lBM2ElXTRVqEor6edUWSntXM=; b=LWVVyBwg9tPDaAz7VxARDklWr2zc0+WY0hUIGtyYgYQbuZ2forthOIfuK+9Odgogp8 1/tKDwnSSZ3vbyZFpWr0Z4Qb3oGvDgSyNrO8nbmsgcaiWfRL6iePJSQxAd2yhNZJPyHU T1o7AzmSWAP8pIvHAKM/gXp9jFh3XkphacftWC3XmP4EjZADU1goIltJFcbebGJtDQ7m KbGvhVbP0uchmWSvqM0DjInY0kCT8n1o9cGSPD+A/CwX6Hy1mmdxR6rBsAUpPZUpbMx4 Mi/82silzM4OAh9Owx9qGGTg5mL2hvYDkAa2St0L19fCo2gQr2JXjX7CGksO7a9Gwoni HTjA== X-Gm-Message-State: ANoB5pnpfGg0dNxJNvylQQkpsr0J68wUPWO5Qy0MjdlKQDpreeqX4TYv LQvh/muTVc30n06dg0L3scg= X-Received: by 2002:a05:6000:1e02:b0:242:6aad:879e with SMTP id bj2-20020a0560001e0200b002426aad879emr24265849wrb.7.1671278848265; Sat, 17 Dec 2022 04:07:28 -0800 (PST) Received: from localhost ([2a00:23c5:dc8c:8701:1663:9a35:5a7b:1d76]) by smtp.gmail.com with ESMTPSA id y5-20020a056000108500b0023657e1b980sm4824492wrw.53.2022.12.17.04.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 04:07:27 -0800 (PST) Date: Sat, 17 Dec 2022 12:07:27 +0000 From: Lorenzo Stoakes To: Baoquan He 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: <20221217015435.73889-6-bhe@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 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;