Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4571927rdb; Fri, 29 Dec 2023 06:22:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWAlDKkQ6akaOLf844lYAZD3vyCMmCXH1J/urqgPCiucj2qJLhog1FsWfcWYGijHMZ3XPv X-Received: by 2002:ac2:5bc7:0:b0:50e:7bb5:a381 with SMTP id u7-20020ac25bc7000000b0050e7bb5a381mr3169964lfn.33.1703859729312; Fri, 29 Dec 2023 06:22:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703859729; cv=none; d=google.com; s=arc-20160816; b=lzVXDps3MzmAPdo+7RF4JJgNH/O3Yai6c1TDSASnCO999YdBCVp9oStiF/5qzMiA2G waQ+tdeWgjA+wUDkmYK8ggJp7KJqiBgZaSKBS36DD82IcS1ah2WGnT8mQAr9aR/r1yBF 7MdmxdimcBIxqaVk7LT/lEXMbWOzNNpLXbG159MRVd7MC+fmPXDm3fFLcLzrBOy594Be 450GrBQJRUvzAnoMb+Va+oSIyo+yduyg+7kep5mUSg1OZAbkDq2XItaqgjNqQy9tz/nC /qOL1bvDdsoiT2HV7kcA8mCx7caMrU6rLzKnRCsapN4BEX3xQMj66fa0k6EXjnyDkQtB /wuQ== 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=uia/OcVw+8oMM3SlBscvdoKEOngf/xeuNs9EweFJQFM=; fh=XBbqqbjR4GSvHAHDNJgFyWZ8SAzjGmTEgS58s1j/Tr4=; b=gHO/87IT7Q3LFa3qVMK0d5XwaXTecDRvTdVgedVcXoyPQqMOVCtKKd0UrMPU5O9SuH JO/crtTyCZH5Xab4n4knn4ekG+4Y+kKM9lCF0KD9dVy/xPC3nniSmeB65uwlMVerR2bu yh++DxJ/iEPYV8ZLIF+VE4UJd2rJaTs6H/+tqA0bIlq3B/4pRPtkE+RPxkblyNfCKsGf 9QGNtqH3CZ6eazoZCBCtijOfnwLbiLa0yjV8rTd6nHGTS6fZ7OGOLisMhQK9M+dWvNGI sJA7dDT0cBhvCCn2BVnGCNZMr5iRQcf/iSCtG20gn992EnH9JX8zr2+yYq+2wpiwsOj9 KUfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=YEA3hGyp; spf=pass (google.com: domain of linux-kernel+bounces-13120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13120-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m12-20020a056402510c00b0055365e5f972si8261255edd.596.2023.12.29.06.22.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 06:22:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=YEA3hGyp; spf=pass (google.com: domain of linux-kernel+bounces-13120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13120-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 0E3BC1F2235C for ; Fri, 29 Dec 2023 14:22:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4362311CA4; Fri, 29 Dec 2023 14:21:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YEA3hGyp" 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 5989211720; Fri, 29 Dec 2023 14:21:50 +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=uia/OcVw+8oMM3SlBscvdoKEOngf/xeuNs9EweFJQFM=; b=YEA3hGyp+SRej8VlBz9cGVs5YW SUeiuyUAo3+t+++F/b0sMxuyZUmDKTElyd08c3NEhOjSDRB25MUOXSKBccqYWtSepYKlLO5Ky9ont /jpzc0QFoLrR8j+NPcLqUX+vAQvPrkY23U5yA7KyfBbLkFcf9n/+P3MSHeR3fBS6rcYPY8ENZLViD ECb/ILnN6bFBsexb0k8jI8i1sw8OihCB2TEpnRVtRwRaw7drw60f1UBDheSFlXBgmboGTffc5ol6H FgLcl9+dLahzrCWPsnzu4ChsT5CZ6t67njCrYglE88v69tamcFmLhG65t4OGdrMdAa88XYoWkAKwH PzTuEp6w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rJDkB-006GOp-Cc; Fri, 29 Dec 2023 14:21:47 +0000 Date: Fri, 29 Dec 2023 14:21:47 +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> <54b353b6-949d-45a1-896d-bb5acb2ed4ed@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: <54b353b6-949d-45a1-896d-bb5acb2ed4ed@web.de> On Fri, Dec 29, 2023 at 10:10:08AM +0100, Markus Elfring wrote: > >> 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. > > I suggest to reconsider the usefulness of such a special function call. Can you be more explicit in your suggestion?