Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp143844imj; Wed, 13 Feb 2019 06:07:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IbIqrnEEheAYq08rUYcrdomm9YuJGVNj6dawTiXYGvA9J01nVShWS+pfuVQmKDv0Ugbci69 X-Received: by 2002:a63:554b:: with SMTP id f11mr644665pgm.37.1550066830088; Wed, 13 Feb 2019 06:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550066830; cv=none; d=google.com; s=arc-20160816; b=TVzWjfNJF7csazeSy99sf3gA5Ax7rCntOadnehjFeZg2zy7StpsR8/sdWwN4k89IAh 6F7HHFGDhoozoZocPPv5AScUEK3jTsCAkEZXIRSesyzWOQCQF+nj81SDSh3xiTKo8BhC nHOP1HEF+QU8OH3zNVTvKjfBIU6XnLSUNqqcPrpu0UX5tCxO9ULfDCHQAVz8DR5p/4Lb TY+PmGTUgIpnceI3u30Teo044mniPsQF4y99moVTLgrDD08qcG17234ECnaiOCc/jhhB Mk8sJy2U8tAwo9/CqaDOG7chc2hUVDgXdpBY4ZjSYXWzo8QaM08DvNKiKa41ntByqaqS L8vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=/otioxL71+vv6+Cw/bWX78kVE35gtRdbNsQi5uO17TQ=; b=XGI7V1gpVn2FVX4iwvnV+bAT/CpJ1mUJTfKIk4tmsyRtGrHn+FvPclnn4NqQ27bl/+ /9gMD89oELl7qQQzbQ0Y7UslBUBX1B2wlr/x0eFmAk5OXEYSKwz7fzV6XquCGav2vPdB 0Ua3H61a1euUT+wbH48nzy76RN55cE106a2KrGpcXc7nk5ItQmSG1Nx+FqjZyT79fNxZ hALel4XszpPBYvooBJlVuRqRLvm63oUJYuPJu7cIWLZcWLEIlRXMXYnlPFA/kBcN48St kEfUbbqYNfs5pKiVGR1YiH1Y2NFwho2knZ569qf9OwnvK2ud2F9bXzqIjBwdkfH8CRwi DN8Q== 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 d10si12606342pgh.591.2019.02.13.06.06.46; Wed, 13 Feb 2019 06:07:10 -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 S2404068AbfBMMZG (ORCPT + 99 others); Wed, 13 Feb 2019 07:25:06 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:33730 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727981AbfBMMZD (ORCPT ); Wed, 13 Feb 2019 07:25:03 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 82A97577AD98EE5C5761; Wed, 13 Feb 2019 20:24:57 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.408.0; Wed, 13 Feb 2019 20:24:50 +0800 From: "zhangyi (F)" To: , CC: , , Subject: [PATCH] tracing: fix incorrect tracer freeing when opening tracing pipe Date: Wed, 13 Feb 2019 20:29:06 +0800 Message-ID: <1550060946-45984-1-git-send-email-yi.zhang@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") 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); -- 2.7.4