Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1744478rdd; Thu, 11 Jan 2024 08:03:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6FrouRQmpQ4Jr8aORFRxwzou059LVDI6THCU24cwf7K+iMHbtQ6anpLj3tiUOYYPWjH26 X-Received: by 2002:a05:6358:511e:b0:175:702d:3eb with SMTP id 30-20020a056358511e00b00175702d03ebmr40955rwi.11.1704989038701; Thu, 11 Jan 2024 08:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704989038; cv=none; d=google.com; s=arc-20160816; b=BBefnq+RisaFEpm4+lrhqluEbYVhnfqPOOnvX0YO1A6Y9Z4WuVgQgUSKfYElWYgLJL V+tlxFiZmNar5UcwNByJaT79TkINy7ujIWraImeUgNeHfJl+0rfkQjXOtdDFcVTADxrk uiDOIPRrcQYVDWKQ8pbMVFcifXqSRvFHhjOs9c1sDHrZGLB5v+UarPgdqAJ/R0XtF/G8 vPCSu4T/lVMmt3nAtiixez44uBPg7w7GNqga80DLBQzsFSRDFLvJ/HtwfMHshpEebag4 YynskQnnBcnKkP7tIxeOUjgwFe5UTrDWDEiKPQdSd3xs2qhZM8NtfCqmF+8d7OuW605f WYYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from:dkim-signature; bh=XeuKhDcKJWfphdN1PILa+BY3ook1Xxotmozr9wWl3c0=; fh=B5U3MKhS2T2yYbU4wkqvZaKmw2+eNK8DiwPoqEFP+NE=; b=KTxTWdXJ4S/o/icOpQHxbDsTUwzoll4qRG4YpTiI4Seg4FX1dXEtjeN4zH4uf0cGDA Fo4/kr9rpIFVKpFlFiRWE+lT6rOaloRRpFq9miMP5nuPlFmIctR876q3aESviGKbYJi3 EzR2mArmyvqIS1DI1vSLFCRUOA9KPGc/O2SxfPbfxZC+txKb4ruuzRt7inN0cpg940P5 YjMyECdg+sI/iloVH3G3zNgY26raKm8ouIbgyf2Q56K91p5SUJMb+zzekahmYs3JkB86 qMntcqfu/wqIkdSQGyLecmj0FmU4xS7ahQzYeuTa9DvpOaXJSpeDkDtcnuPDb+vVlJnB 43Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dH9KIyVg; spf=pass (google.com: domain of linux-kernel+bounces-23826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w128-20020a636286000000b005cef24bafc6si1362806pgb.783.2024.01.11.08.03.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 08:03:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dH9KIyVg; spf=pass (google.com: domain of linux-kernel+bounces-23826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8CAA5282B15 for ; Thu, 11 Jan 2024 16:03:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6097050245; Thu, 11 Jan 2024 16:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dH9KIyVg" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DFFA5024F for ; Thu, 11 Jan 2024 16:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-50ea9daac4cso5645648e87.3 for ; Thu, 11 Jan 2024 08:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704989024; x=1705593824; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=XeuKhDcKJWfphdN1PILa+BY3ook1Xxotmozr9wWl3c0=; b=dH9KIyVgAPIZF2VMvv2UWzsjgRd6X/fHRrD+WDwg3iZWGwbxqRzLRV7qyP4aR6YTQA I/aluXY/PBjw2+jH+pHbAD1a/brl8ntwlumuPhBnt+ZjwcCKu91V08FSf4E63aZReWWi /0q7zu9AWRfBc6gVs4OpR5It58y1+KHOohayuMq1a833uxKcFKprMkJWEEsrHfQMcpzn uoCRiso4j+tgnJwVf1s/XyLcYt48mIet02b3wLitWTKWtSv3LnXRIbqRbS8+3PRL4z0j dj2Au00VjzfY7aN4hxeQCBq7gVy78IMTR4A9+KRw4ncgLHnBFZW5WOCDRF5bXgJDOsLJ XZdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704989024; x=1705593824; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XeuKhDcKJWfphdN1PILa+BY3ook1Xxotmozr9wWl3c0=; b=flXJ5iHQLUqRAutwktzHLBqaIOzJ6EGZVhSizBtuGtPfCF7807xGvi/yLTJV4rZVzn uy9jbOt69Fb2P3qdgZ7pja9ybzyIjs4YD7UlFuO6VIJA5oxhqJ4+8tRF2bhW4hc0n857 qCCvNoggIitxOnZeXiKY+JVyZex6FJWMdzQk1Kt3K7z0Gc5BXZIWX3TcHDzCn9bKY9nS sE+eM6/0VQ00KJHUkWyh6mlvCYMGCFINUUzgTQ5GF7AaUmSNx4RKTSydn18FuEKtn/5s VOgW2Qj278rPdl3WXHZbOQPwQ8U8r5STpJuyUCrEq0P6a5urtZDT4mU5c6+l931VV7tq hpSQ== X-Gm-Message-State: AOJu0YzC+ChvBDh21icPhiML6rsfqqi7sC+UHiNBZS3Oq/Eevc4ZteFh za7ZtmIqm6Yw4pSKvSKpMDc= X-Received: by 2002:a19:ee03:0:b0:50e:84f8:77dc with SMTP id g3-20020a19ee03000000b0050e84f877dcmr737199lfb.111.1704989023905; Thu, 11 Jan 2024 08:03:43 -0800 (PST) Received: from pc638.lan (host-185-121-47-193.sydskane.nu. [185.121.47.193]) by smtp.gmail.com with ESMTPSA id k43-20020a0565123dab00b0050e7e409500sm233698lfv.244.2024.01.11.08.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 08:03:43 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Thu, 11 Jan 2024 17:03:41 +0100 To: Nathan Chancellor , Andrew Morton Cc: "Uladzislau Rezki (Sony)" , linux-mm@kvack.org, Andrew Morton , LKML , Baoquan He , Lorenzo Stoakes , Christoph Hellwig , Matthew Wilcox , "Liam R . Howlett" , Dave Chinner , Oleksiy Avramchenko , kernel test robot Subject: Re: [PATCH 1/1] Fix a wrong value passed to __find_vmap_area() Message-ID: References: <20240111121104.180993-1-urezki@gmail.com> <20240111155511.GA3451701@dev-arch.thelio-3990X> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240111155511.GA3451701@dev-arch.thelio-3990X> On Thu, Jan 11, 2024 at 08:55:11AM -0700, Nathan Chancellor wrote: > On Thu, Jan 11, 2024 at 01:11:04PM +0100, Uladzislau Rezki (Sony) wrote: > > There was a type in the vmalloc_dump_obj() function. Instead > > of passing a real address which is "objp" an "addr" was used > > what is wrong and not initialized. > > > > Reported-by: kernel test robot > > Fixes: e88b85b81d5 ("mm: vmalloc: offload free_vmap_area_lock lock") > > I am not sure that e88b85b81d5 introduced this. Based on the diff, I > think it was actually commit 86817057732a ("mm: vmalloc: remove global > vmap_area_root rb-tree"). Does not really matter for the patch text but > I think it does matter for what change this gets squashed into. > Right you are! Below is updated version: From 98f1fd2d3913f3b7bcbe49785a78f67999151f1c Mon Sep 17 00:00:00 2001 From: "Uladzislau Rezki (Sony)" Date: Thu, 11 Jan 2024 13:04:07 +0100 Subject: [PATCH 1/2] mm: vmalloc: Fix a wrong value passed to __find_vmap_area() There was a type in the vmalloc_dump_obj() function. Instead of passing a real address which is "objp" an "addr" was used what is wrong and not initialized. Reported-by: kernel test robot Fixes: 86817057732a ("mm: vmalloc: remove global vmap_area_root rb-tree") Closes: https://lore.kernel.org/oe-kbuild-all/202401111810.TKPIXLCs-lkp@intel.com/ Signed-off-by: Uladzislau Rezki (Sony) --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index e30dabf68263..43a6608e1397 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -4688,7 +4688,7 @@ bool vmalloc_dump_obj(void *object) vn = addr_to_node((unsigned long)objp); if (spin_trylock(&vn->busy.lock)) { - va = __find_vmap_area(addr, &vn->busy.root); + va = __find_vmap_area((unsigned long)objp, &vn->busy.root); if (va && va->vm) { addr = (unsigned long)va->vm->addr; -- 2.39.2 -- Uladzislau Rezki