Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1034784rdb; Sun, 7 Jan 2024 00:06:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvwKQFE32MHdHFKOfW3yQUGv32scy5mH99w+qAMf/mKTTIZfjp11SCYHwExIkXCtI07dOJ X-Received: by 2002:a50:aa97:0:b0:554:526d:894e with SMTP id q23-20020a50aa97000000b00554526d894emr981506edc.1.1704614774635; Sun, 07 Jan 2024 00:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704614774; cv=none; d=google.com; s=arc-20160816; b=y0lGqYGO6+0UJRKi84hFdSNTzZR5XfALZOudAlTCQ1d4mhzGLXIpWParjF1eZjTpWG bZBTxrtYaa3yq58YHWcL/hyTk9kCB6HqGF2NEVRSvhnit2+TZq+rJn7NoKhxWMEdkSKp ue2pdWEcGYnsQpu43k6DDoc58eAV8k7uIzwpDpO5TNpa28D5ZqXbDDp1SX23m3VJCL4f JpNSS2a3YdkKGpYwzCgs6fcCCB8VhWbyv66KHbjCXghmXLa8vbfG66JKuy9vguf/OWb+ cTDfREmOMbMP+tG8uECQF4Cdda2fCY3YvKtFVuuHQP7PbPmPlgopC8cvgIszEs4TBoGe CwaQ== 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:from:date; bh=AEG7ghf2XqEukvupR+QdNpWAbdqyFWWb1aAwF6hAdU8=; fh=L4eTDtzjvLGwoVvGnWV7u+j59V0AQVvG7y/S6rfPASc=; b=Nqx/KU0Ehq/CLR8RhQILLPCQYlwG8t/i9PRSW9v48d3ntEjmysAudwq+daGccMR3CT NKCfgwNHgxbe7Kxu5yN09Ga0pHgA7IDov+asm1M3Yzi4dlpSOFhIRqY0uLfnyeSDFDSd HZzNwIQeQzGJMJ8+7ihSfZhTIqkUYTH8HW3WGBYP7m+2EMoc5tCETAQi2xKj53h9Ca/1 uFxr/PCelso9E5+Mqk/62wsYDRP5A5XuMG4az0UvpIgrnmWgG8jbfPnr0wJKvGaC8fHg 4QUwesNUlRnoICk6SOmfYxSNmj0VDiRv/mEMjOLrnXYNe2Sn10Em7u52fFjsmr9tejyg WW1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18811-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o8-20020a509b08000000b00557742ca986si810826edi.39.2024.01.07.00.06.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 00:06:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18811-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5CE1F1F21C15 for ; Sun, 7 Jan 2024 08:06:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFF2012B78; Sun, 7 Jan 2024 08:06:04 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 245D5125BF; Sun, 7 Jan 2024 08:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 14EE372C8CC; Sun, 7 Jan 2024 10:56:23 +0300 (MSK) Received: from pony.office.basealt.ru (unknown [193.43.10.9]) by imap.altlinux.org (Postfix) with ESMTPSA id D1A1836D0170; Sun, 7 Jan 2024 10:56:23 +0300 (MSK) Received: by pony.office.basealt.ru (Postfix, from userid 500) id AE40C360AC7D; Sun, 7 Jan 2024 10:56:23 +0300 (MSK) Date: Sun, 7 Jan 2024 10:56:23 +0300 From: Vitaly Chikunov To: Dominique Martinet Cc: Christian Schoenebeck , Fedor Pchelkin , Eric Van Hensbergen , Latchesar Ionkov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , v9fs@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Khoroshilov , lvc-project@linuxtesting.org Subject: Re: [PATCH v4] net: 9p: avoid freeing uninit memory in p9pdu_vreadf Message-ID: <2et72smsvglzicqsyvt5m7bx2akyqzi2moq7tjupppygbsme3u@o2sltttok5wy> References: <20231206200913.16135-1-pchelkin@ispras.ru> <1808202.Umia7laAZq@silver> 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: Dominique, On Tue, Dec 12, 2023 at 08:21:30AM +0900, Dominique Martinet wrote: > Christian Schoenebeck wrote on Thu, Dec 07, 2023 at 01:54:02PM +0100: > > I just checked whether this could create a leak, but it looks clean, so LGTM: > > Right, either version look good to me. Also, there was unnoticed bug in v2[1] - `int i` is moved to outer block and `i` counld be used uninitialized inside of `if (errcode) {`. Thanks, [1] https://lore.kernel.org/all/20231205091952.24754-1-pchelkin@ispras.ru/ > I don't have a hard preference here, I've finished testing and just > updated the patch -- thanks for your comments & review > (and thanks Simon as well!) > > -- > Dominique Martinet | Asmadeus