Message ID | 20230201091339.61761-6-bhe@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6963AC05027 for <linux-mm@archiver.kernel.org>; Wed, 1 Feb 2023 09:14:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 088BC6B0072; Wed, 1 Feb 2023 04:14:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 03D866B0078; Wed, 1 Feb 2023 04:14:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E44206B007B; Wed, 1 Feb 2023 04:14:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D5F646B0072 for <linux-mm@kvack.org>; Wed, 1 Feb 2023 04:14:18 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AE761140D01 for <linux-mm@kvack.org>; Wed, 1 Feb 2023 09:14:18 +0000 (UTC) X-FDA: 80418161796.20.7C2B6EC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf25.hostedemail.com (Postfix) with ESMTP id E767FA000F for <linux-mm@kvack.org>; Wed, 1 Feb 2023 09:14:16 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=H2qzEb17; spf=pass (imf25.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675242856; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5ERwgOoTIt99ygprY7f+Kv4bRDSO29pRQMOJk0egizU=; b=hggdAU94mVPJgZAGAjx6tFc3dtKZGPQPR8tKSKEgeGXEtwlZ6cXkYF9DRgLhvaGjhviSoE QV3XxEYlAwpgXsn2rCn2oANQJoL1Ju4Q4O3ZWx1FZ7x6/QqiICNUxnl0VEEVaor5HCamB3 j8TZ4/BrKrZeXrsx8YjCql2vKfd3veU= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=H2qzEb17; spf=pass (imf25.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675242856; a=rsa-sha256; cv=none; b=hnfBPGzmsU7qdU+ANbbXTV8abpX/+3uHxnMX9CAwF27WpOO9Un4wyCGTgONXmkwvxYT4Ae 2qmJt5ugTXv0xOfLgkNo3i66FQqsRJqpQ/uxj/FZUNEd/HW/fL2OINyu247BatOe/2ThZW 8IKGLgLWxucIkEfCgSZiLbuxYAAIGL0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675242856; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5ERwgOoTIt99ygprY7f+Kv4bRDSO29pRQMOJk0egizU=; b=H2qzEb172qQVqeSluxsVwdy0HMOIIZZvc101dj/J8yDw1OlnWkED8nkNk2k5waAbbp/pmG Xz94moQalib+pFbJTOWDZPF/84MJoEaPmk+NmvU7a207KBzk1GpLBPeqziW+6D3eweLHOP DQfEY4umszD3pF4y/ApnQvarUa8PFuM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-Lifv6lTfO0SmDChZSfFdLA-1; Wed, 01 Feb 2023 04:14:13 -0500 X-MC-Unique: Lifv6lTfO0SmDChZSfFdLA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 833AD183B3C0; Wed, 1 Feb 2023 09:14:12 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-89.pek2.redhat.com [10.72.13.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F5BF492C3E; Wed, 1 Feb 2023 09:14:07 +0000 (UTC) From: Baoquan He <bhe@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, stephen.s.brennan@oracle.com, urezki@gmail.com, lstoakes@gmail.com, willy@infradead.org, hch@infradead.org, error27@gmail.com, Baoquan He <bhe@redhat.com> Subject: [PATCH v4 5/7] mm/vmalloc: skip the uninitilized vmalloc areas Date: Wed, 1 Feb 2023 17:13:37 +0800 Message-Id: <20230201091339.61761-6-bhe@redhat.com> In-Reply-To: <20230201091339.61761-1-bhe@redhat.com> References: <20230201091339.61761-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E767FA000F X-Stat-Signature: tusouk789uoc1695j3pjajuria7z5d3q X-HE-Tag: 1675242856-550893 X-HE-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sESQzKhdXZGn+SaVP+0InK/DLytLt1X8pk5J1jiJzq/5fNaIu1ureK2qT3ePa3jtNeH0TbjI+8BbJpbou5BjMUZ95vr6RN5pHRSa9nP+OulZQXQs3BAsI/7aOWcPQFJVtwHGw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
mm/vmalloc.c: allow vread() to read out vm_map_ram areas
|
expand
|
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index e515dbacb0cb..504b63606613 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -3667,6 +3667,11 @@ long vread(char *buf, char *addr, unsigned long count) if (!vm && !flags) continue; + if (vm && (vm->flags & VM_UNINITIALIZED)) + continue; + /* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ + smp_rmb(); + vaddr = (char *) va->va_start; size = vm ? get_vm_area_size(vm) : va_size(va);