From patchwork Wed Jul 17 09:16:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Xiang X-Patchwork-Id: 11047515 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DEFB1800 for ; Wed, 17 Jul 2019 09:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79DB828704 for ; Wed, 17 Jul 2019 09:17:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BC3328714; Wed, 17 Jul 2019 09:17:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B9C728704 for ; Wed, 17 Jul 2019 09:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=IUfw2xWeyGn2MVbB8gdiHb8KrxGnkG4SJ4kecpDPqpM=; b=MGj zn7H7uhH0LGsAIG0jgUYHTj5kAbfgnq46rLIXUC2LF92E2LE8KLC9fIpuqN3EXkT5mr0A71NPMLtS R8JBT7/fWb4N8IOqwX2VB1v5q9JFBD8/oqWmxbuL2dItgn6PYFP5bydjYi69c0u7MIQSrTRv3zSQv NQcZbTGtoDW9QLy0BG624/3aRcXwFmmlK3flupL9WDL10FLN5pRcRnQUhBU8Ex+IGTCJA+hJlxsT8 gqfSGDlptrSxPO8ckkJ0tg2hxhs2o9FAfX+mFNn2M/QIpqNE06i8FTED5pdvsSRK4A18isnriz5YZ FbqX5/KFRZNIsNbTFz3I+9f5HucHLAQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hng3f-0002eb-EU; Wed, 17 Jul 2019 09:17:07 +0000 Received: from cmccmta1.chinamobile.com ([221.176.66.79]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hng3Y-0002dj-UD for linux-arm-kernel@lists.infradead.org; Wed, 17 Jul 2019 09:17:03 +0000 Received: from spf.mail.chinamobile.com (unknown[172.16.121.11]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee15d2ee76e2e8-86566; Wed, 17 Jul 2019 17:16:30 +0800 (CST) X-RM-TRANSID: 2ee15d2ee76e2e8-86566 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.105.0.243]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee65d2ee76dcd3-a1b74; Wed, 17 Jul 2019 17:16:29 +0800 (CST) X-RM-TRANSID: 2ee65d2ee76dcd3-a1b74 From: Ding Xiang To: alexander.shishkin@linux.intel.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Subject: [PATCH] stm class: Fix a double free of stm_source_device Date: Wed, 17 Jul 2019 17:16:28 +0800 Message-Id: <1563354988-23826-1-git-send-email-dingxiang@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190717_021701_450132_86E923D4 X-CRM114-Status: UNSURE ( 6.22 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP put_device will call stm_source_device_release to free stm_source_device, so remove the kfree. Signed-off-by: Ding Xiang --- drivers/hwtracing/stm/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index e55b902..181e7ff 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -1276,7 +1276,6 @@ int stm_source_register_device(struct device *parent, err: put_device(&src->dev); - kfree(src); return err; }