Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp253142rdb; Tue, 5 Dec 2023 04:44:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3bW7dH5JVtCIudl7fSK/QDKCZ+gMQQR3hLYbLXYU1No4lvtr4lcJgGT+B9Mi/WdwkhcLm X-Received: by 2002:a05:6a00:c82:b0:6ce:7cba:3a6e with SMTP id a2-20020a056a000c8200b006ce7cba3a6emr69859pfv.10.1701780253206; Tue, 05 Dec 2023 04:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701780253; cv=none; d=google.com; s=arc-20160816; b=S+FTXSfjZN5dFMIen0ZE6p/pUx8O3NSg10kMtIaj6P3vDSRd99oIjau2TmTA+4Z/rr jGmlqmC0UvvoicDb4Z/5s5OUPQe0DbQF3QpYPiZxSX9Tpl+USHOTpLytPLvReSTKOwY2 kygD7qb9or6yTdDt4iWxhhbvofbW3MQ3O/NjETo9fXWUx26tOw/wAvXiab8NH1meg/1W i/vnMIGa5Q5L6JN57NTtSGnxQUzndZERfPG7kAaMXkUvLqOn9H0mqKh9PzFy8zzoWeo/ i15xUZKwu7RxRu1Lk43osJ+AeffgwaGOrpmhaOeNGf/kKnxHG7vje0zURn7VAEiAKrF9 ooEg== 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 :dkim-signature; bh=9k2hEUfWqSwjsOCNxJeHa/J+KeqtpWnpfnSOvtCRoqo=; fh=t6DIeRiLumsrOaOdPVvJm//iwsKIdQc2F+tgaxwzvMg=; b=kyqg1r2davLm4nxZJc47HusYEYvYgsttSpovfXB2tlewOkUWqiiHjujtoTRgpSadLb 9F/oqSU9KGPpWK/zSif/pZgy2bjbgwySfKY/HvjkGbcufNtbtM0pc0smY/S8VQHNlqvl t5+TxEsxYjs8NHPVLx95R42crQb7TnFO5gZ120RgBe/cWsL8CtHRX4LcM+Onvo1ZRsmG l4a/VgtPdv7a4hXkVwbVprFBp76LKPzFZyk0+HiyY5SIw32NFAGwLPQ5MSJmteUIMnT7 J7+GFZWnEgk+YiPFntHfJcrGDuhu6G5RmA/dWolsq2Ak/JYiVtPRYKDIJ7oXkGC8h2oV SWdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=RgakGAYx; dkim=pass header.i=@codewreck.org header.s=2 header.b="r5l5QQB/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i4-20020a63cd04000000b005c663eae37asi5432028pgg.252.2023.12.05.04.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:44:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=RgakGAYx; dkim=pass header.i=@codewreck.org header.s=2 header.b="r5l5QQB/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B147580A87C8; Tue, 5 Dec 2023 04:44:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235124AbjLEMnu (ORCPT + 99 others); Tue, 5 Dec 2023 07:43:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231873AbjLEMnt (ORCPT ); Tue, 5 Dec 2023 07:43:49 -0500 Received: from nautica.notk.org (ipv6.notk.org [IPv6:2001:41d0:1:7a93::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D290D7; Tue, 5 Dec 2023 04:43:55 -0800 (PST) Received: by nautica.notk.org (Postfix, from userid 108) id 0512EC021; Tue, 5 Dec 2023 13:43:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1701780234; bh=9k2hEUfWqSwjsOCNxJeHa/J+KeqtpWnpfnSOvtCRoqo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RgakGAYxKTHmfDsp3Xz4ToOiFec531bEiG1oi9xpE8L6ixaQmDIE2gEe/81AmGTsx eRHIgxFTpoptfzdCWKjbWQk2QTwR+BE7qkNahj/nkWO0yDWFek+tn4VLimnd1J70ig 8ANst0jEIPDChSXLz78NnNS2OnIIuCtJG5ozAjrQejv7GqiBlf/ostfQGsn2/4pMIb uXL10maFRsYdzr/npMZvI5/LT0cFtXCym+TKMh9uHo6w0O8q5QYx8xGm56uo1hiikc TCfY9o5H4/3geFLUvnLE6+z96SQUa6eaxBbdYt5bwGz+Elje7NcBzuAiwIVVaCCMu+ 4JMcN2RW9w02w== X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from gaia (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id 79FDEC009; Tue, 5 Dec 2023 13:43:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1701780233; bh=9k2hEUfWqSwjsOCNxJeHa/J+KeqtpWnpfnSOvtCRoqo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r5l5QQB/eieudp+PT4SYxj+jH20QiV6viRJce+pCsKIvdchAaSSo6NJrm8mbpX077 4FfxkWQ1sekeWcSekEviSIJyQz6pPS3ChXg/kZtOFoWvFUV214ioLcZ3ymvXOOEFLq TFdGCULG3GMJQkCbiNgoSAqnxxJ3Ula5kL07YimK58QyKTqWpFU8zR+2JHu0jHIKqu QA7P8uGIOdPCs/vNM+ym0SuZlWDPdbLE5D+Cqwyr+JYnE+ofu4z9wcAaV00YcwQJ1l R31riyGsVI5wQdTKV90vNKG1rZwuhw8h67zc4qzlX7UPuI5eSg1AF0Nwwfc70vv8Pw 9eWMwT5UxDIsg== Received: from localhost (gaia [local]) by gaia (OpenSMTPD) with ESMTPA id 98847857; Tue, 5 Dec 2023 12:43:47 +0000 (UTC) Date: Tue, 5 Dec 2023 21:43:32 +0900 From: Dominique Martinet To: Fedor Pchelkin Cc: Latchesar Ionkov , Eric Van Hensbergen , Christian Schoenebeck , "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 v2] net: 9p: avoid freeing uninit memory in p9pdu_vreadf Message-ID: References: <20231205091952.24754-1-pchelkin@ispras.ru> <2974507b-57fa-4c9b-a036-055dbf55f6a4-pchelkin@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2974507b-57fa-4c9b-a036-055dbf55f6a4-pchelkin@ispras.ru> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 05 Dec 2023 04:44:10 -0800 (PST) Fedor Pchelkin wrote on Tue, Dec 05, 2023 at 03:15:43PM +0300: > As for the second initialization (the one located after kfree(*wnames) in > error handling path - it was there all the time), I think it's better not > to touch it. I've just moved kfree and null-assignment under > 'if (*wnames)' statement. Ah, I somehow missed this was just moved; that doesn't change anything but doesn't hurt either, sure. > The concern you mentioned is about any user that'd ignore the return code > and try to use *wnames (so that the second initialization makes some > sense). I can't see if there is any such user but, as said before, it's > better not to touch that code. Yes, it was here before, let's leave it in. > > I don't mind the change even if there isn't but let's add a word in the > > commit message. > > OK, will do in v3. I've queued to -next as is (with the i initialized as Christian pointed out), will update if you send a new one later. Thanks, -- Dominique Martinet | Asmadeus