Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1288005ybt; Thu, 2 Jul 2020 01:27:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJHpVKWew9x/gozr56JI79tYV3av2ykcZY7IkfY2TtEhceCRsvtdzPhLSv8msF0Hk0C8Un X-Received: by 2002:a50:8d5a:: with SMTP id t26mr35325008edt.282.1593678462575; Thu, 02 Jul 2020 01:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593678462; cv=none; d=google.com; s=arc-20160816; b=J+C7bQa5zpl25/XBcA7UfkdeaH7m+ZpLKrLRd+B0kHblsXIdOMNTSylpo4IYbYqcjV cmVGIxHW401XNygQ0DeIzO9EyRfkaXWLXagNQWfdZKuyyzIGFLL49gKxuRCF8QZzLQpF 0qKtm6MJ0Q7na1xmsgnJVrswrbkMsVAXLnbiGN/JWa8kMaCF3sQ30HdIr6XsooRM5Q1O 5YplrQ3zjr42tgjWfbAqOmX0m33vVjuxndqAsEA1hK3ylciHXRs+Tf5TYtIBxgyNKV0o 1fIx1ItJsab27MXbkuUC4yYFtK0vqHiI4tZA6pS9YM2O4CXwsZ5G2DuK42AbPoscZm+r 8WWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=eowq8oeLvg1E04oRT6n5eSB31vm9HI0GBWfq+kZDe/8=; b=EIqynRBGWSWwX21lpfJAKaHXc/jefJHvga0KGCluETEI0+2WMH4CS9yKMjzs3Z0RXh hBCSFi4jooF9MRFOKOsgkgvvEMT/RHowGU6+k9QCqd2dwJKLZQq6W8X4FHPbOH5zVIB8 3LR/R7kFCCur4Ke/io60o9cp9myC7SfgStMyXfeUVCeRJYOSkjyGfxC1eeyv/PrJm9y6 YaIYPD00ZUOWFHdXZLcQwKZ98vp2HEdFsaoezR5N3VSozacPKjwhkdH+EG1zp5qSeAMb qtffHFvXmAeRz9E0YVePHHUlkFYg4yXt4asowphZyFcukvUZUznGKJ4+u/P8aOZX5f9z vmoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si5410458edr.557.2020.07.02.01.27.19; Thu, 02 Jul 2020 01:27:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728344AbgGBI0Q (ORCPT + 99 others); Thu, 2 Jul 2020 04:26:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:47900 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbgGBI0P (ORCPT ); Thu, 2 Jul 2020 04:26:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 63D70ADC1; Thu, 2 Jul 2020 08:26:14 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 4642DDA781; Thu, 2 Jul 2020 10:25:58 +0200 (CEST) Date: Thu, 2 Jul 2020 10:25:58 +0200 From: David Sterba To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Waiman Long , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.7 11/53] btrfs: use kfree() in btrfs_ioctl_get_subvol_info() Message-ID: <20200702082558.GH27795@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Waiman Long , David Sterba , linux-btrfs@vger.kernel.org References: <20200702012202.2700645-1-sashal@kernel.org> <20200702012202.2700645-11-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200702012202.2700645-11-sashal@kernel.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 01, 2020 at 09:21:20PM -0400, Sasha Levin wrote: > From: Waiman Long > > [ Upstream commit b091f7fede97cc64f7aaad3eeb37965aebee3082 ] > > In btrfs_ioctl_get_subvol_info(), there is a classic case where kzalloc() > was incorrectly paired with kzfree(). According to David Sterba, there > isn't any sensitive information in the subvol_info that needs to be > cleared before freeing. So kzfree() isn't really needed, use kfree() > instead. I don't think this patch is necessary for any stable tree, it's meant only to ease merging a tree-wide patchset to rename kzfree. In btrfs code there was no point using it so it's plain kfree.