Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp925869imp; Wed, 20 Feb 2019 11:35:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IYjyOj9ASOOr3qLjUVp3/v8ifBcc2tcFwYZPVrfZSiIVQFLcGeCfXHtCMB+QS0yaoDK+Vq0 X-Received: by 2002:a63:5343:: with SMTP id t3mr30268049pgl.415.1550691348780; Wed, 20 Feb 2019 11:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550691348; cv=none; d=google.com; s=arc-20160816; b=iQ5YZCMXpHj7KLOGdX/rLkFKlUfXWFTTduaAkzwDMcw8iLzpQf8uYsWHyhm30sgzDT CHYAuHUgx0BRyBBrFAdyA9yDp1u+2HrjPCXqf2oRHSjjNQ3Z0oWrTGMlzlY02iwCwnSC DWusP+8eDrHPOVlQN/MRkm4bDnRoQrMPv/krJ8KsY+N/+SmvjNtBIrkFkABL5OZmeHLc 1WIQcudQL1ahp1Yo/kzh3gx29Ur693T5naE98TXEjtD3nClBRowj+lRmMcI/jmkcpS6r Ifn6SUaAwwyR3cgK5DnaYntUKVEWScwRwZExAN82joYZW+aNBm7wX4ZKi0y6/Uf4KCAW wU0Q== 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=SdpxpkQQqnQu5+9+PQ/XOm68ITp9yXRo6ZoYlaO3T5Q=; b=b4QZ2ximt2m9GALJGPEUQQHcv1tzdF+Nnr7ul8TKuf7dDLj/sPnayhCQd06ZGaDsO0 rgEns8NOU7sedNYy6vQ37bqlPTt4YCYM2vZNcYeycZuAA2KmWF70GC8qmlCRAUH8jzSG It0a+hoq0j1A11Isx/HNR9S/Y3+kl9JLjxw760vGIPu+1ivCmVBMJH/0uvf/7Rx1ho+g oewI5/GyTgs55WhSIP3JXawCS+wJRGJ0IEFSMQwbnPnCN26tKagzqviHSYKWCD87C5yV XyGAMdc/psUaqOz4qsPUs7P55Y7SgI3mIurPQ/8nqpQ5UlRTDaNnBP6KC7v6ucuNPkro adKQ== 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 g8si9431218pgd.52.2019.02.20.11.35.32; Wed, 20 Feb 2019 11:35:48 -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 S1726017AbfBTTfM (ORCPT + 99 others); Wed, 20 Feb 2019 14:35:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:55426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfBTTfL (ORCPT ); Wed, 20 Feb 2019 14:35:11 -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 152F72146E; Wed, 20 Feb 2019 19:35:11 +0000 (UTC) Date: Wed, 20 Feb 2019 14:35:09 -0500 From: Steven Rostedt To: "zhangyi (F)" Cc: , , Subject: Re: [PATCH] tracing: fix incorrect tracer freeing when opening tracing pipe Message-ID: <20190220143509.6121f58c@gandalf.local.home> In-Reply-To: References: <1550060946-45984-1-git-send-email-yi.zhang@huawei.com> <20190213083635.36f4762e@gandalf.local.home> 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 Sat, 16 Feb 2019 19:19:03 +0800 "zhangyi (F)" wrote: > On 2019/2/13 21:36, Steven Rostedt Wrote: > > 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. > > > > This patch patch want to remove kfree(iter->trace) instead of kfree(iter), > which is set by tr->current_trace and probably not allocated dynamically. > So if we kfree such tracer in the error path, it will lead to BUG_ON. > This should have been mentioned in the change log. Anyway, I tagged it for stable, but it will be pulled in during the next merge window, as that shouldn't be too long from now. -- Steve