From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B99C18E362 for ; Wed, 5 Mar 2025 18:26:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741199163; cv=none; b=G2wCeY/BAzIqxEZPzH/C8g/BxU9OBhZkoQGmCO/pPLZV6ipgA8KcP6o7gwt08WlVxePkpaEg5CHUJfM2Go6dkQF03wsIiSNQfi5wTQ6jqN9xL7FGyScVz1he0cWvPYir7EdYnKbSAcQNG27XwLOHPEBZ0jOTyZBxii9QDuqzMhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741199163; c=relaxed/simple; bh=xnYuyaNVXncB7uxGLWFUWsmhJrqIEKW7rR/7ZC5CiaY=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=Xr6P8FpACoIGutBW8nNSwkSPI6ndChTImSMgqxlFs/Z5Nrj4TRITL8JQX13ayJ7qvwlFqn3L9WKd5cX4Wqlpi2JRRw/r/naFKsya7QJqjkIXa9IeXkZxUfwtz7F0RAdXSX2FGQcJq1EPbc/i4OnDDX5N1ILsm3PPuY4bn7kcLvA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=rIVNU23p; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=5sixJxiH; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="rIVNU23p"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="5sixJxiH" Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id BAC141140199; Wed, 5 Mar 2025 13:25:59 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-09.internal (MEProxy); Wed, 05 Mar 2025 13:26:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1741199159; x=1741285559; bh=q1dco+A1ZQ134eZ1BhjcbdIuYCO4f0Xtrgj8AjId3H0=; b= rIVNU23pV2mRSjKjsxplZRcfLak3xJn+HgNi52nfZKD0hkxLhz81qR0zds8sc6O/ 80DK6rfwnPw7bC7b3aV2ocpN6OzavwlWunwR6YOCtp0hsqy1R2HSTXYAu/nWpEXQ NDq265NtpP7uiPYENnhaIDXKCEta55HZ8gslnbn3CEHyauWTB2mXLuHBUUKkDK2K soSmV89GGqb3AZBT+b3wrH+iKWIgKEpECg0AK7RwC2kDuFCBvOwn9oNZuJA+/LKQ rB6rdcbZY8U1LPhssEsvxMn/2xWzAgKmrtWIu2S7fIM8vIeRadKOUYU/arrmoh4z 1f3I/dGjmR0zCgiLvSyk0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741199159; x= 1741285559; bh=q1dco+A1ZQ134eZ1BhjcbdIuYCO4f0Xtrgj8AjId3H0=; b=5 sixJxiH2hJ5LQPpsk8DGqxPZdxBE9mzc6oZqYom7PI7wCZLSewmTfa8PaeOLmQuR /82LWLLL3vieFsafOb91od1lcZoUA2ZHR115GK5Amq3mgTwaTpX9vSa0SMI63dCF TOIQ+fsa6mMOVGdmat8qRnU40W6S5oUaCFPqIFDDi1+y2kaneUwlQR2x9Vd7ql1q B5NTvB++t70PxcKCy94I3QSM317iykHrEClT5OOkT1KxlfD4YktCbAcWHHrg+ffK y2tNdFg53cNGgywiizyninT0UVaZoVzF3xUamjWO0/TuZWA0Lw1CLIpXoZMl/O94 8RRo6r9QH5XB3Gj0DIbtg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdehheehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtjeertder tddtnecuhfhrohhmpedftehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnug gsrdguvgeqnecuggftrfgrthhtvghrnhephfdthfdvtdefhedukeetgefggffhjeeggeet fefggfevudegudevledvkefhvdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohep uddvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjvghffhiguhestghhrhhomh hiuhhmrdhorhhgpdhrtghpthhtohepphgvughrohdrfhgrlhgtrghtohesghhmrghilhdr tghomhdprhgtphhtthhopehjrghnnhhhsehgohhoghhlvgdrtghomhdprhgtphhtthhope ifrghnghhkvghfvghnghdrfigrnhhgsehhuhgrfigvihdrtghomhdprhgtphhtthhopegr rhhnugeskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqmhhmsehkvhgrtg hkrdhorhhgpdhrtghpthhtoheprghkphhmsehlihhnuhigqdhfohhunhgurghtihhonhdr ohhrghdprhgtphhtthhopehlihgrmhdrhhhofihlvghtthesohhrrggtlhgvrdgtohhmpd hrtghpthhtoheplhhorhgvnhiiohdrshhtohgrkhgvshesohhrrggtlhgvrdgtohhm X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 970AD2220072; Wed, 5 Mar 2025 13:25:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Wed, 05 Mar 2025 19:25:38 +0100 From: "Arnd Bergmann" To: "Lorenzo Stoakes" , "Arnd Bergmann" Cc: "Andrew Morton" , "Liam R. Howlett" , "Vlastimil Babka" , "Jann Horn" , "Pedro Falcato" , "David Hildenbrand" , "Kefeng Wang" , "Jeff Xu" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: References: <20250305172800.3465120-1-arnd@kernel.org> Subject: Re: [PATCH] mm/mremap: fix uninitialized return code Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, Mar 5, 2025, at 18:29, Lorenzo Stoakes wrote: > On Wed, Mar 05, 2025 at 06:27:56PM +0100, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The 'err' variable is set in a conditinal branch and is not >> set otherwise: >> >> mm/mremap.c:1017:7: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] >> 1017 | if (vma->vm_start != old_addr) >> >> Set it to zero before the initial value is set. >> >> Fixes: 3129f7896afb ("mm/mremap: initial refactor of move_vma()") >> Signed-off-by: Arnd Bergmann > > Thanks for this, however this has already been fixed via Andrew doing a > fix-patch which should land in mm-unstable,-next soon (possibly tmr?). > > This is entirely my bad btw, for some reason my compiler locally didn't > catch this even with CONFIG_WERROR on which _really_ surprises me... Unfortunately gcc never shows warnings about conditionally uninitialized variables. There is a -Wmaybe-uninitialized, but that has so many false positives that it is completely useless and it is turned off globally. Arnd