Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4424013rdb; Fri, 29 Dec 2023 00:51:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHb6+X1JyTDQrYiq41PsNTs+Fx4YaoniyTMcK0RCoaB+7rSKsgaIlf9jByjTVYiXF46CYM9 X-Received: by 2002:a05:6808:198b:b0:3b8:6422:5891 with SMTP id bj11-20020a056808198b00b003b864225891mr17048634oib.20.1703839915249; Fri, 29 Dec 2023 00:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703839915; cv=none; d=google.com; s=arc-20160816; b=Rx7cre62WhwEysRll44Osj7EFzqfxLTYGqeNf1CGqSWiPjl3vjwQCta/oB9CeEkBil NlmPuhuWz8xfEvPplLW6LfZqdN6C6FZlGBTBUcUauihHvBmYsjEzZiT+CPQKAv9pDmTr 81fkMWW/+QshUIJ77Vee2D1SGtHrmroze4ioOPM8E14RnjEnjPgmn50QSj436l1SetVk 5szlWe2UREXtweXhEsYL0iIlisd5nJ/BnHsvaliqZDX4mr0FUkhRUToUvI/waVQGj+GC uPhTKhbUlwRsFz3U0kjmy4LWzglO9A1O/hGSlj12EqIo7R0+kvW9yHWL0eLLxir6XmKS OFtg== 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:dkim-signature; bh=zUGYiv9pf0gsR+xsThOtoJjaGjo2zmNHPQw801ghpqI=; fh=XBbqqbjR4GSvHAHDNJgFyWZ8SAzjGmTEgS58s1j/Tr4=; b=DUwzaAAjWL5VhwbLrOpJdG5bbl/8zouCIfxNNEXCNbVpshbZwbzCokplLQZ2/BzYKy DC3lG0IPctif8EqwvWlv4CF8xfzWsr4ZHkhhFgZsBYhxyYgVUU5tER0KOEa356OqbLUM B/wYjbiW7mzWto542XlhSSqlg4bc3D/380OQETOlTgJ8nQ72ApqF9KPPLIKpPt2AcgPT 0uzhpKk/MWdi7zCwLyU2sVaFMibcATEsTyf5JHYdpR8p0Z3iNCkGhGWgzIKnm3uV83Vs kZKoVIw6Obz9buzXaL0KXlR5GdS3mvDsuIw/b/vxZTSofxtYX8Q2ZwSY6RgbCOtZ5jvz ouUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=a3bdh6+w; spf=pass (google.com: domain of linux-kernel+bounces-13001-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13001-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id g7-20020a170902934700b001d42ccfc41asi10661198plp.647.2023.12.29.00.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 00:51:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13001-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=a3bdh6+w; spf=pass (google.com: domain of linux-kernel+bounces-13001-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13001-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 348AEB21801 for ; Fri, 29 Dec 2023 08:51:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EED38801; Fri, 29 Dec 2023 08:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="a3bdh6+w" X-Original-To: linux-kernel@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 BB5347493; Fri, 29 Dec 2023 08:51:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zUGYiv9pf0gsR+xsThOtoJjaGjo2zmNHPQw801ghpqI=; b=a3bdh6+wNPZXlwfejs9ZFUJ263 BX4BcKKXC5KJPZSLdng4RRJmU7QMBBwPqGvi47t5Epn4WW1IedxTFvj3N5RJvUn5pZCy6mTrqm094 qfe8YkuRsnZuNPg58mz0XR1EEYY8E64fZSvj8cwaX9R62lMtw8QN4wTwU1reWu6AWt7Q31yfX9Qxi +ikcUcPvSfb/66RoE6SXN/I+5bsFMW9tVLofjZJtOF7ZuGJKbwFkAGkb8X5XQsUO0ZhBT/bfnnr55 3MOcjUawQ02zJkebhgpXZ8YdxuIsPhpVjRLH80LMzETkoW2QmazLuPZla4lm7Y9yiMum/WTZa8tDa um4L2qmg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rJ8aQ-0064ep-Tv; Fri, 29 Dec 2023 08:51:22 +0000 Date: Fri, 29 Dec 2023 08:51:22 +0000 From: Matthew Wilcox To: Markus Elfring Cc: virtualization@lists.linux.dev, linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org, Miklos Szeredi , Stefan Hajnoczi , Vivek Goyal , LKML Subject: Re: [PATCH 2/2] virtiofs: Improve error handling in virtio_fs_get_tree() Message-ID: References: <5745d81c-3c06-4871-9785-12a469870934@web.de> 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: <5745d81c-3c06-4871-9785-12a469870934@web.de> On Fri, Dec 29, 2023 at 09:38:47AM +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 29 Dec 2023 09:15:07 +0100 > > The kfree() function was called in two cases by > the virtio_fs_get_tree() function during error handling > even if the passed variable contained a null pointer. So what? kfree(NULL) is perfectly acceptable. Are you trying to optimise an error path?