Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp195387imj; Wed, 13 Feb 2019 06:54:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IagWKHX4Z4/JkEOx2sgRb6x2ClimTBSvHDZmKQ/8Q/I5o0pzzwwkQ4Xj4jq1ngE3gAh5qkm X-Received: by 2002:a63:1408:: with SMTP id u8mr805459pgl.271.1550069697172; Wed, 13 Feb 2019 06:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550069697; cv=none; d=google.com; s=arc-20160816; b=ZlUz9bvC+YKh9e2AWBOrId7sHHVm/zccveWvvVhYQ3UoP+Fw+iTpI4Azwo3680J2rm e80c6ZC2SKT/IcwqLrM0Y3tIBv5Dx/7iLUvWt5fSjQyPh7xp0qOPcFI19vz5Obv/Otnl ah1kEgeJibx7ptl2Jq9NyCtEeGrRNUzzgkJHBYE3zKU6OFa7SYV2ZJ05PMGkcQDj5FLY rVnGMCzCapDM8geR4BWb3fiNuv9ou7W5xeq1QUeeL/dS2kRluF2cD/l+UjH0Wiv+yztc GpJHtWAKaqyEGuJq0ge+lYlLMoiPKfNWpqwwdxeb1WgpERoXsrL/YrxRmEjv77/lEAxL uA5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=3CNPu15Xy9D7MCA+fBHbGBt3EPT+ELAwv3O9weTZWlc=; b=redNlc59msLENOT/jPT7TwE+xTTBwDuRbveZu+OjNKW9n3aACZ4cXe49YRbjc43dgG YB39G9GbbN7AOAYJxI7vgxXGIqNHD6f4sbGyuDrkWU5wOsuUpEB11KrDn+cX4a7uMAp1 HTYBubyXeZrRcv1JAZfcCJy/Ad+HuPHtxOiV2ZNAinM1TxFdSZU+JHyZIdg+f2MXDfHj ElEeRQdwUMxAKrNTjVsPl6ikRy6Zfyrh26wFelLEcfoDF/ZJVMhkbMmFmvTppLTAjfBc GtBGcXJiW8p3UxLXRA3Jz67fplegL3C0IeNKaOevLNBownggJLDO6ITP3wVNBlPaSr2W UqLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 144si15362130pga.322.2019.02.13.06.54.39; Wed, 13 Feb 2019 06:54:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732241AbfBMNgi (ORCPT + 99 others); Wed, 13 Feb 2019 08:36:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:52898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732064AbfBMNgh (ORCPT ); Wed, 13 Feb 2019 08:36:37 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5C1B217F5; Wed, 13 Feb 2019 13:36:36 +0000 (UTC) Date: Wed, 13 Feb 2019 08:36:35 -0500 From: Steven Rostedt To: "zhangyi (F)" Cc: , , Subject: Re: [PATCH] tracing: fix incorrect tracer freeing when opening tracing pipe Message-ID: <20190213083635.36f4762e@gandalf.local.home> In-Reply-To: <1550060946-45984-1-git-send-email-yi.zhang@huawei.com> References: <1550060946-45984-1-git-send-email-yi.zhang@huawei.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Feb 2019 20:29:06 +0800 "zhangyi (F)" wrote: > Commit d716ff71dd12 ("tracing: Remove taking of trace_types_lock in > pipe files") use the current tracer instead of the copy in > tracing_open_pipe(), but it forget to remove the freeing sentence in > the error path. > > Fixes: d716ff71dd12 ("tracing: Remove taking of trace_types_lock in pipe files") Thanks. As this is harmless (frees to NULL is ok, and iter is allocated with kzalloc()), I'm going to just add this for the next merge window. -- Steve > Signed-off-by: zhangyi (F) > --- > kernel/trace/trace.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index c521b73..b583ff7 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -5624,7 +5624,6 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp) > return ret; > > fail: > - kfree(iter->trace); > kfree(iter); > __trace_array_put(tr); > mutex_unlock(&trace_types_lock);