Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp657772ybg; Tue, 9 Jun 2020 09:34:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2EUlfS87rz/M9/aC1Ww6gcxOyU3cY4V+eCTMGm+hiJAF0g6xbLqe9t3mNfRN/SjGlxEAW X-Received: by 2002:a17:906:b88d:: with SMTP id hb13mr26947163ejb.96.1591720447396; Tue, 09 Jun 2020 09:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591720447; cv=none; d=google.com; s=arc-20160816; b=agjb250IdysX+gu/e3QtcBoUqGgrawmyu5THRSUY/aYfAW304V+Xhf4OeB0pDmBn7H ycAxsb3ABJbBnciR8tbTLWQSxfFEYEVx37bRG4ybFxW7ol21uQxkAPMnxHlY58EsoD2i zCy26CHwEc7xHQJP0lkDITlU4QKZIi2GboENxrsBBnfHjI9zqweE8ZhRVOKHYjrQkh7n UEloCcBw8LuTW3RaGw4pTz5sRoY33TNikIpH+UukrSlTgFKk/JG2pT4ABEtWGaoYmCoA shmE4P5VPSzJb5NjW3qiubMmoW7mrxbyp2s6lVRN0mZ/tbtCoBrZ9OWC5w8xaH1HpOm4 jX6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=tdyLlF57UFxSaMwWDT82g2GaZb0lkNJM3qwopX+fXmQ=; b=Vpt7p5G92WsUaUhuWWhUr3RSHA8yoYtpcdf1Aji6F1xpKjeFokIlkkkWuyIhmMwVg9 nX8tH1xHMGenjAWYPoM1C90r59K72JMCmGxRQADWJUDiIGENNKhQ18xH5eTOEorg6nWL 7MJq5qgdND4VNalYcYXvTXOHxj5zOQvRDCM6HqQ75+/IsQKIyZ2LaGxYNsB21W2I72gS uFJRh1FeXPKg9pfrW0eQ2qRc14wPG9LHCdHf2qooXf3f2xSYVG2pPXeALfANDSgKSlQk DuWlWeJJpuZCWt2IP4i6YSUKya3JG//oE1nAFFyk1OWLD7amR2kkVNF+jvGvV66WYPf5 LNTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=DlBUsRRr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si11220872ejx.646.2020.06.09.09.33.44; Tue, 09 Jun 2020 09:34:07 -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; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=DlBUsRRr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgFIQbZ (ORCPT + 99 others); Tue, 9 Jun 2020 12:31:25 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:48276 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgFIQbZ (ORCPT ); Tue, 9 Jun 2020 12:31:25 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 059GQuVr029832; Tue, 9 Jun 2020 16:30:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=tdyLlF57UFxSaMwWDT82g2GaZb0lkNJM3qwopX+fXmQ=; b=DlBUsRRrZ/j92bP4SIW4e10Tmd0Zle90gGR1hWqJXWp+o4IJMB4ZBQNgr4wzHNud9/I2 CakYvf1N+V8/SVWzz9m9tAFB1AxP4hANptQIkTmn7vxEBs5qWHOhUU4p7eRImwceOFmk wCRcJxAjJ4rNnKnS2wfPNCAD+Wy743awQLH+RCJDNV9oqS5FvVUEqC1UkxPrXMXt/kxW 2yCtHwUiL1gcZ64HHKVFyPu3m7138e50hARb6az6WjI2WCXDAQdeFqo1SyDltwb1TMWh BAOeCWeunh5xT4cAkWyD7I+N9/kiO6ADVfqi4Y4aLCzjAvhbdLjKHB88GkMaq9SGlNZy ZA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 31g3smwraq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 09 Jun 2020 16:30:52 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 059GSNSv142368; Tue, 9 Jun 2020 16:30:52 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 31gn26990p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Jun 2020 16:30:51 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 059GUovU006554; Tue, 9 Jun 2020 16:30:50 GMT Received: from dhcp-10-159-155-165.vpn.oracle.com (/10.159.155.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Jun 2020 09:30:50 -0700 Subject: Re: [PATCH] sample-trace-array: Remove trace_array 'sample-instance' To: Kefeng Wang , linux-kernel@vger.kernel.org Cc: Steven Rostedt , Aruna Ramakrishna References: <20200609135200.2206726-1-wangkefeng.wang@huawei.com> From: Divya Indi Message-ID: Date: Tue, 9 Jun 2020 09:30:49 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200609135200.2206726-1-wangkefeng.wang@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9647 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006090125 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9647 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 cotscore=-2147483648 suspectscore=3 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 mlxscore=0 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006090125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Divya Indi On 6/9/20 6:52 AM, Kefeng Wang wrote: > Remove trace_array 'sample-instance' if kthread_run fails > in sample_trace_array_init(). > > Signed-off-by: Kefeng Wang > --- > samples/ftrace/sample-trace-array.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/samples/ftrace/sample-trace-array.c b/samples/ftrace/sample-trace-array.c > index 9e437f930280..6aba02a31c96 100644 > --- a/samples/ftrace/sample-trace-array.c > +++ b/samples/ftrace/sample-trace-array.c > @@ -115,8 +115,12 @@ static int __init sample_trace_array_init(void) > trace_printk_init_buffers(); > > simple_tsk = kthread_run(simple_thread, NULL, "sample-instance"); > - if (IS_ERR(simple_tsk)) > + if (IS_ERR(simple_tsk)) { > + trace_array_put(tr); > + trace_array_destroy(tr); > return -1; > + } > + > return 0; > } >